Skip Docker Hub login for forked PRs #2629
Merged
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.
Summary
Background
GitHub secrets (
DOCKERHUB_USERNAMEandDOCKERHUB_TOKEN) are not accessible to workflows triggered by forked pull requests for security reasons. This causes the Docker login step to fail with "Username and password required", blocking CI for external contributors.The Docker Hub login was added in #2443 to avoid rate limit (429) errors when pulling base images like
python:*andnvidia/cuda:*during builds. While authenticated pulls have higher rate limits, anonymous pulls should be sufficient for most forked PRs.Changes
Added conditional logic to both Docker Hub login steps in CI:
This ensures:
Trade-offs
Pros:
Cons:
Testing
This fix will allow PR #2619 (and other forked PRs) to run integration tests successfully.