ci: honor a repository-variable override for the push gateway image - #4722
Open
jeremylongshore wants to merge 1 commit into
Open
ci: honor a repository-variable override for the push gateway image#4722jeremylongshore wants to merge 1 commit into
jeremylongshore wants to merge 1 commit into
Conversation
The relay/desktop image jobs already read IMAGE_NAME from the GHCR_IMAGE repository variable so forks can push to their own namespace without forking the workflow file. The push gateway jobs predate that pattern and hardcode ghcr.io/block/buzz-push-gateway in the metadata, build outputs, cache refs, manifest merge, attestation subject, and summary. On a fork, GHCR login authenticates as the fork owner, so the buildcache export to ghcr.io/block/... is denied and the job fails after an otherwise-green build; the cache-to same-repo guard passes for same-repo PRs inside a fork, so it does not prevent this. Adds PUSH_GATEWAY_IMAGE with the same vars-override shape (GHCR_PUSH_GATEWAY_IMAGE, defaulting to ghcr.io/block/buzz-push-gateway) and references it everywhere the literal appeared. Defaults preserve the canonical repo's behavior byte-for-byte. Fixes block#4720 Signed-off-by: jeremylongshore <jeremylongshore@users.noreply.github.com>
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.
Summary
The relay/desktop image jobs already read
IMAGE_NAMEfrom theGHCR_IMAGErepository variable so forks can push to their own namespace "without forking this file" (the env block's own words). The push gateway jobs predate that pattern and hardcodeghcr.io/block/buzz-push-gatewayin nine places — metadata, build outputs, cache refs, manifest merge, attestation subject, and the summary. On a fork, the GHCR login authenticates as the fork's owner, so the buildcache export toghcr.io/block/...is denied and the job fails after an otherwise-green build. Thecache-tosame-repo guard passes for same-repo PRs inside a fork (both sides equal the fork), so it doesn't prevent this.This adds
PUSH_GATEWAY_IMAGEwith the identical override shape (GHCR_PUSH_GATEWAY_IMAGE, defaulting toghcr.io/block/buzz-push-gateway) and references it everywhere the literal appeared, mirroring how the relay job usesIMAGE_NAME(yaml positions via${{ env.* }}, run blocks via stepenv:). Defaults preserve the canonical repo's behavior byte-for-byte; a fork sets one repository variable and its docker workflow is clean.Related issue
Fixes #4720. Duplicate check: paged all 770 open issues via the API — no existing issue or PR covers this (nearest neighbors #3260/#3842 are different push-gateway/compose bugs).
Testing
actionlintclean on the modified workflow; YAML parses.ghcr.io/block/buzz-push-gatewayliteral is the env default.main: Build public push gateway dies at cache export withdenied: permission_denied— builds green, fails only at the block-namespace cache write.GHCR_PUSH_GATEWAY_IMAGEunset, every reference resolves to the exact prior literal.