-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
32 lines (27 loc) · 846 Bytes
/
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
name: 'Setup tkn'
description: 'Setup Tekton CLI'
branding:
icon: 'terminal'
color: 'purple'
inputs:
version:
description: 'Version of tkn to set up (latest, v0.18.0, etc.)'
required: false
default: 'latest'
runs:
using: "composite"
steps:
- shell: bash
run: |
# Get the version, which defaults to latest release
tag="${{ inputs.version }}"
# Get the operating system
os=${{ runner.os }}
if [[ $os == "macOS" ]]; then
os="Darwin"
fi
echo "Installing tkn@${tag} for ${os}"
# Get the tar.xz
curl -LO https://github.com/tektoncd/cli/releases/download/${tag}/tkn_${tag:1}_${os}_x86_64.tar.gz
# Extract tkn to your PATH (e.g. /usr/local/bin)
sudo tar xvzf tkn_${tag:1}_${os}_x86_64.tar.gz -C /usr/local/bin/ tkn