forked from charlieegan3/fetch-gh-release-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
58 lines (53 loc) · 1.66 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: fetch-gh-release-binary
description: |
GitHub Action to download binaries from GitHub releases and make them
available for use in later steps.
inputs:
owner:
description: "Owner of the repo with the release asset"
required: false
repo:
description: "Repo with the release asset"
required: false
version:
description: "Version of the release asset to fetch, if unset, use latest"
required: false
asset-pattern:
description: "Pattern the asset name must match"
required: false
install-path:
description: "Where to put the installed binary"
required: false
verbose:
default: false
description: "whether to enable verbose logging"
required: false
GITHUB_TOKEN:
required: false
token:
required: false
description: "GitHub token to use for authentication"
default: ""
runs:
using: "composite"
steps:
- run: |
VERSION=0.4.1
BINARY_NAME=fetch-gh-release-binary
ASSET_NAME=${BINARY_NAME}_${VERSION}_Linux_amd64.tar.gz
echo Fetching https://github.com/threecommaio/fetch-gh-release-binary/releases/download/$VERSION/$ASSET_NAME
curl -LO https://github.com/threecommaio/fetch-gh-release-binary/releases/download/$VERSION/$ASSET_NAME
tar -zxf $ASSET_NAME
./$BINARY_NAME \
"-owner=${{ inputs.owner }}" \
"-repo=${{ inputs.repo }}" \
"-version=${{ inputs.version }}" \
"-asset-pattern=${{ inputs.asset-pattern }}" \
"-install-path=${{ inputs.install-path }}" \
"-verbose=${{ inputs.verbose }}" \
"-token=${{ inputs.token }}"
rm $BINARY_NAME
shell: bash
branding:
icon: arrow-down-circle
color: orange