-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
60 lines (53 loc) · 1.64 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
59
60
name: 'STK CLI Action'
description: 'Github Action to install STK CLI'
inputs:
client_id:
description: Account client id
required: true
client_key:
description: Account client key
required: true
realm:
description: Account realm
required: true
runs:
using: "composite"
steps:
- name: Check Runner
run: echo 🤖 OS runner is $(uname)
shell: bash
- name: Install STK CLI
run: |
if [[ "$(uname)" = "Linux" ]]; then
# Install jq, curl, zip, and git
sudo apt-get update
sudo apt-get install -y jq curl zip git
cd /tmp
curl -fsSL https://stk.stackspot.com/install.sh | bash
echo "~/.stk/bin" >> $GITHUB_PATH
elif [[ "$(uname)" = "Darwin" ]]; then
cd /tmp
curl -fsSL https://stk.stackspot.com/install.sh | bash
sudo mv /Users/runner/.stk/bin/* /usr/local/bin
echo "~/.stk/bin" >> $GITHUB_PATH
else
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install curl[tool]
cd $GITHUB_WORKSPACE
curl https://stk.stackspot.com/installer/windows/stk.exe --output stk.exe
./stk.exe upgrade
mv stk.exe /bin
fi
shell: bash
- name: Login to StackSpot Account
run: stk login --client-id=${{ inputs.client_id }} --client-key=${{ inputs.client_key }} --realm=${{ inputs.realm }}
shell: bash
- name: Show STK CLI version
run: stk --version
shell: bash
branding:
icon: 'terminal'
color: 'gray-dark'