File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,11 +22,25 @@ jobs:
2222 with :
2323 fetch-depth : 0
2424
25- - name : Verify gh CLI supports skill subcommand
25+ - name : Ensure gh CLI >= 2.90 (skill subcommand available)
26+ env :
27+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2628 run : |
29+ gh --version | head -n 1
30+ if gh help | grep -q '^ skill:'; then
31+ echo "gh skill subcommand already available"
32+ exit 0
33+ fi
34+ echo "Installing latest gh CLI from cli/cli releases"
35+ LATEST=$(gh api repos/cli/cli/releases/latest --jq .tag_name | sed 's/^v//')
36+ TARBALL="gh_${LATEST}_linux_amd64.tar.gz"
37+ curl -sSL -o "/tmp/${TARBALL}" "https://github.com/cli/cli/releases/download/v${LATEST}/${TARBALL}"
38+ tar -xzf "/tmp/${TARBALL}" -C /tmp
39+ sudo install -m 0755 "/tmp/gh_${LATEST}_linux_amd64/bin/gh" /usr/local/bin/gh
40+ hash -r
2741 gh --version | head -n 1
2842 if ! gh help | grep -q '^ skill:'; then
29- echo "::error::gh skill subcommand not available (requires gh CLI v2.90+) "
43+ echo "::error::gh skill subcommand still not available after upgrade "
3044 exit 1
3145 fi
3246
You can’t perform that action at this time.
0 commit comments