From 538a7bf024534de11920d59a99bc6adcbc688091 Mon Sep 17 00:00:00 2001 From: "hugh-hackman[bot]" <266376744+hugh-hackman[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 17:44:34 +0000 Subject: [PATCH] ci: use binary download for gh CLI install on self-hosted runners (#18) The apt-based gh CLI install requires sudo which is not available on our self-hosted container runners. Replace with a direct binary download from GitHub releases that works without elevated permissions. Fixes the "gh: command not found" error in the release workflow's "Create PR for version bump" step. Co-authored-by: Hugh Hackman Co-authored-by: Paperclip --- .github/workflows/plugin-release.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugin-release.yaml b/.github/workflows/plugin-release.yaml index 9876115..51af9ed 100644 --- a/.github/workflows/plugin-release.yaml +++ b/.github/workflows/plugin-release.yaml @@ -153,9 +153,12 @@ jobs: - name: Install GitHub CLI run: | if ! command -v gh &>/dev/null; then - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null - sudo apt-get update && sudo apt-get install -y gh + GH_VERSION="2.74.0" + curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz" -o /tmp/gh.tar.gz + tar -xzf /tmp/gh.tar.gz -C /tmp + mv "/tmp/gh_${GH_VERSION}_linux_amd64/bin/gh" /usr/local/bin/gh + rm -rf /tmp/gh.tar.gz "/tmp/gh_${GH_VERSION}_linux_amd64" + gh --version fi - name: Create PR for version bump