-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yaml
38 lines (38 loc) · 1.15 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: github-s3
description: Uploads a file to GitHub using attachments API
inputs:
repo:
description: 'The repository to upload to, defaults to the current repository'
required: false
default: ${{ github.repository }}
github-session:
description: 'The GitHub user session cookie'
required: true
files:
description: 'The files to upload'
required: true
outputs:
links:
description: 'The links to the uploaded files'
value: ${{ steps.upload.outputs.links }}
runs:
using: composite
steps:
- name: Install github-s3
shell: bash
run: |
curl -sSL --output /tmp/github-s3.tar.gz https://github.com/j178/github-s3/releases/latest/download/github-s3_Linux_x86_64.tar.gz && \
tar -xvf /tmp/github-s3.tar.gz -C /tmp && \
chmod +x /tmp/github-s3
- name: Upload
id: upload
shell: bash
run: |
links=$(/tmp/github-s3 -repo ${{ inputs.repo }} ${{ inputs.files }})
{
echo 'links<<EOF'
echo $links
echo EOF
} >> $GITHUB_OUTPUT
env:
GITHUB_SESSION: ${{ inputs.github-session }}