-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (39 loc) · 1.27 KB
/
action.yml
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
39
name: 'gh-downloader'
description: 'Download asset from a GitHub release according to a version scheme/template'
inputs:
github-token:
description: 'github token to download the asset with'
required: false
default: ${{ github.token }}
repo:
description: 'what repo to downlaod the asset from'
required: true
asset:
description: 'the name of the asset of the release'
default: '{{ .repo }}-{{ .os }}-{{ .arch }}-{{ .version }}'
output:
description: 'where to output the asset'
required: true
mode:
description: 'the file mode of the file downloaded'
default: '0644'
scheme:
description: 'scheme of the release to pull the asset from (i.e. v1.x.x)'
default: 'latest'
if-not-exist:
description: 'only download if the file does not already exist'
default: 'true'
runs:
using: "composite"
steps:
- run: $GITHUB_ACTION_PATH/gh-actions-install-cli.sh
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
- run: gh-downloader -r ${{ inputs.repo }} -o ${{ inputs.output }} --mode ${{ inputs.mode }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
SCHEME: ${{ inputs.scheme }}
ASSET: ${{ inputs.asset }}
IF_NOT_EXIST: ${{ inputs.if-not-exist }}