Skip to content

fix(ci): pass tool versions via build-args to avoid GitHub API rate limiting#11

Merged
hrygo merged 1 commit intomainfrom
fix/ci-rate-limit-gh-api
Mar 11, 2026
Merged

fix(ci): pass tool versions via build-args to avoid GitHub API rate limiting#11
hrygo merged 1 commit intomainfrom
fix/ci-rate-limit-gh-api

Conversation

@hrygo
Copy link
Owner

@hrygo hrygo commented Mar 11, 2026

Summary

  • Pass GitHub CLI, yq, and lazygit versions as build arguments from CI to avoid rate limiting during Docker build
  • Add fetch tool versions step in CI prepare phase using GH_TOKEN authentication
  • Maintain backward compatibility: local builds still work by falling back to dynamic version fetch

Problem

CI was failing with exit code 22 when Docker tried to fetch latest tool versions via GitHub API without authentication. This is because unauthenticated requests are limited to 60/hour, and the 3 API calls during build could exceed this limit.

Solution

  • Move version fetching to CI prepare phase where GH_TOKEN is available
  • Pass versions as build-args to docker build-push-action
  • Update Dockerfile to use passed versions or fallback to dynamic fetch

Test plan

  • Trigger CI build and verify it completes successfully
  • Verify all three tools (gh, yq, lazygit) are installed with correct versions

🤖 Generated with Claude Code

…imiting

- Add GH_VERSION, YQ_VERSION, LG_VERSION as build args in Dockerfile
- Modify install scripts to use passed version or fallback to dynamic fetch
- Add fetch tool versions step in CI prepare phase with GH_TOKEN auth
- Pass versions to docker build-push-action via build-args

This resolves CI failures caused by GitHub API rate limiting (60 req/hour)
when fetching latest tool versions during Docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hrygo hrygo merged commit 6d06293 into main Mar 11, 2026
2 checks passed
@hrygo hrygo deleted the fix/ci-rate-limit-gh-api branch March 11, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant