generated from tj-actions/docker-action
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.yml
58 lines (55 loc) · 1.96 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: Setup Binary Packages
description: GitHub Action to install Go/Rust binaries
author: tj-actions
inputs:
token:
description: 'GITHUB_TOKEN or a Repo scoped PAT'
required: false
default: ${{ github.token }}
repository-owner:
description: 'Repository owner where the binary is located'
required: true
repository:
description: 'Repository where the binary is located'
required: true
version:
description: 'Version of the binary to install'
required: false
default: latest
language-type:
description: 'Language type of package to install: `rust` or `go`'
required: true
outputs:
binary_path:
description: 'Path to the installed binary'
value: ${{ steps.setup-bin-rust.outputs.binary_path || steps.setup-bin-go.outputs.binary_path }}
runs:
using: 'composite'
steps:
- run: |
bash $GITHUB_ACTION_PATH/rust-install.sh
id: setup-bin-rust
if: ${{ inputs.language-type == 'rust' }}
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
INPUT_TOKEN: ${{ inputs.token }}
INPUT_REPOSITORY_OWNER: ${{ inputs.repository-owner }}
INPUT_REPOSITORY: ${{ inputs.repository }}
INPUT_VERSION: ${{ inputs.version }}
- run: |
bash $GITHUB_ACTION_PATH/go-install.sh
id: setup-bin-go
if: ${{ inputs.language-type == 'go' }}
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
INPUT_TOKEN: ${{ inputs.token }}
INPUT_REPOSITORY_OWNER: ${{ inputs.repository-owner }}
INPUT_REPOSITORY: ${{ inputs.repository }}
INPUT_VERSION: ${{ inputs.version }}
branding:
icon: arrow-down-circle
color: white