Hive
fix(linux-runner-image): bake gh CLI into the runner image
GitHub issue · Closed
What
Installs the GitHub CLI (gh) into the Linux runner image, alongside the kubectl + helm tools it already carries, Renovate-managed via the existing linux-runner-image ARG manager.
Why
The image’s stated design is to “close the gap against GitHub’s Ubuntu hosted-runner image” so workflow steps can assume standard tooling is on /usr/local/bin. It already bakes in kubectl + helm with exactly that reasoning. GitHub’s hosted image also ships gh (install-github-cli.sh), and the repo already depends on it on tuist-linux jobs:
release.yml’strigger-deploydispatches the production deployment withgh workflow run.preview-deploy.ymlposts GitHub Deployment statuses and PR comments withgh api/gh pr comment.
Neither installs gh (nothing installs it via mise anywhere in the repo), so on the current image they fail with gh: command not found. This was caught when trigger-deploy died on exit 127, stranding a fleet-image release without a production deploy.
How
gh is pulled from the cli/cli release tarball in the same RUN layer as kubectl/helm, ARCH-aware via dpkg --print-architecture (matches gh’s linux_amd64/linux_arm64 asset names). GH_VERSION carries a # renovate: datasource=github-releases depName=cli/cli annotation picked up by the existing generic Dockerfile ARG manager, and cli/cli is added to the packageRule that routes these bumps through the fix(linux-runner-image): commit prefix (required — the release is scope-gated, so a mis-scoped bump would silently never rebuild the image) with automerge.
Rollout dependency (important)
linux-runner-image is itself a fleet image, so a release of it defers the push-deploy to release.yml’s trigger-deploy — which is the very job that needs gh. Merging this PR builds and tags the new image but cannot deploy it through the normal path until a working gh is already on the fleet. A one-time manual workflow_dispatch of server-production-deployment.yml (which goes straight to gate → build → cascade and never touches trigger-deploy) breaks the cycle: it rolls the gh-bearing image onto the fleet, after which trigger-deploy on tuist-linux works for all future cycles.
Validation
gh release view --repo cli/cliconfirmsv2.93.0and thegh_<ver>_linux_<arch>.tar.gzasset names the install relies on.renovate.jsonparses (jq); the newGH_VERSIONmatches the existing custom-manager regex and thefix(linux-runner-image):routing rule.
🤖 Generated with Claude Code