Repository navigation
fix: authenticate Docker Hub pulls to avoid CI rate limits - #476
Merged
Merged
Conversation
- Add optional dockerhub-username/dockerhub-token inputs to build-image action - Login to docker.io before setup-buildx-action when credentials are provided - Pass DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets in ci.yml and release.yml - Forks without secrets retain anonymous-pull behavior Refs: #473
There was a problem hiding this comment.
Pull request overview
This PR mitigates intermittent CI failures caused by anonymous Docker Hub pull rate limits on GitHub-hosted runners by adding optional Docker Hub authentication to the repo’s image build path.
Changes:
- Added optional
dockerhub-username/dockerhub-tokeninputs to thebuild-imagecomposite action and conditionally logs into Docker Hub before Buildx. - Wired
DOCKERHUB_USERNAME/DOCKERHUB_TOKENsecrets throughci.ymlandrelease.ymlinto thebuild-imageaction. - Documented the fix in both the root changelog and the workspace template changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/actions/build-image/action.yml |
Adds optional Docker Hub login (SHA-pinned docker/login-action) before setup-buildx-action to reduce rate-limit failures. |
.github/workflows/ci.yml |
Passes Docker Hub credentials (when available) into build-image during CI builds. |
.github/workflows/release.yml |
Passes Docker Hub credentials into build-image for release builds. |
CHANGELOG.md |
Records the CI fix under Fixed in Unreleased. |
assets/workspace/.devcontainer/CHANGELOG.md |
Mirrors the changelog entry in the workspace template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix Docker Hub rate-limit failures on shared GitHub Actions runners. The
docker/setup-buildx-actionstep pullsmoby/buildkitfrom Docker Hub; anonymous pulls on shared runners hit rate limits, causing intermittent CI failures. This PR adds optional Docker Hub authentication to thebuild-imagecomposite action and wires the credentials throughci.ymlandrelease.yml.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.github/actions/build-image/action.yml— Added optionaldockerhub-usernameanddockerhub-tokeninputs; added aLogin to Docker Hubstep (usingdocker/[email protected], SHA-pinned) that runs beforesetup-buildx-actionwhen both inputs are provided; added documentation header explaining the Docker Hub auth rationale..github/workflows/ci.yml— PassedDOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets to thebuild-imageaction..github/workflows/release.yml— Same asci.yml.CHANGELOG.md/assets/workspace/.devcontainer/CHANGELOG.md— Added entry under## Unreleased > ### Fixed.Changelog Entry
Fixed
build-imagelogs in todocker.iobeforesetup-buildx-actionwhenDOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets are set;ci.ymlandrelease.ymlpass themTesting
just test)Manual Testing Details
N/A — CI-only change; verified that the action YAML is syntactically valid via
yamllint(pre-commit) and thatcheck-action-pinspasses for the newdocker/login-actionSHA pin.Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
The new inputs default to empty strings, so forks or repos without
DOCKERHUB_USERNAME/DOCKERHUB_TOKENsecrets simply skip the login step — identical to pre-PR behavior.Refs: #473