Commit 85f46b5
committed
ci: run build-test-push on all PRs and fix ghcr push auth
Fork PRs previously skipped the build-test-push job entirely,
preventing contributors from getting build and test feedback.
The GHCR push step used || between independent secrets:
BOT_TOKEN || GITHUB_TOKEN and BOT_LOGIN || repository_owner.
When only one BOT_* secret was set, credentials became a mismatched
pair, causing a denied: denied authentication failure from ghcr.io.
Changes:
- Remove same-repo restriction from job condition so all PRs
run the pipeline.
- Use && to ensure both BOT_TOKEN and BOT_LOGIN must exist
together to be used; otherwise fall back to the always-
available GITHUB_TOKEN + github.repository_owner pair.
- Expose BOT_TOKEN and BOT_LOGIN as env vars so they can be
evaluated in the if: condition.
- Allow GHCR push on fork PRs when bot credentials are
available; skip only when GITHUB_TOKEN would be read-only
(fork PR without BOT_TOKEN/BOT_LOGIN).
- Use github.repository_owner as fallback username instead of
github.actor to avoid confusion in org fork scenarios.1 parent 6c0a19c commit 85f46b5
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | | - | |
104 | | - | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
0 commit comments