Commit 68fd30c
authored
Skip Docker Hub login for forked PRs (#2629)
Forked PRs cannot access GitHub secrets (DOCKERHUB_USERNAME and
DOCKERHUB_TOKEN), causing the Docker login step to fail with 'Username
and password required'. This blocks external contributions.
This change makes the Docker Hub login conditional:
- Skips login for forked PRs (secrets unavailable)
- Runs login for PRs from branches in the main repo
- Runs login for push events, tags, and manual workflows
Docker Hub authentication helps avoid rate limits (429 errors) when
pulling base images like python:* and nvidia/cuda:* during builds.
Forked PRs will use anonymous Docker Hub pulls and may occasionally
hit rate limits, but this is an acceptable trade-off to unblock public
contributions.
Fixes the issue reported in PR #2619 where forked PRs fail at the
Docker login step in CI.
Co-authored-by: Mark Phelps <mphelps@cloudflare.com>1 parent 471de5b commit 68fd30c
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
| 225 | + | |
222 | 226 | | |
223 | 227 | | |
224 | 228 | | |
| |||
0 commit comments