Skip to content

Commit b42d449

Browse files
committed
feat: setup gh tool by script
1 parent 57453a1 commit b42d449

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ inputs:
2121
runs:
2222
using: "composite"
2323
steps:
24-
- uses: wusatosi/setup-gh@v1
24+
- name: Setup gh tool
25+
shell: bash
26+
run: ${{ github.action_path }}/src/setup_gh.sh
2527

2628
- name: Get current labels from PR
2729
id: get_labels

src/setup_gh.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
6+
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
7+
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
8+
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
9+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
10+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
11+
&& sudo apt update \
12+
&& sudo apt install gh -y

0 commit comments

Comments
 (0)