Skip to content

ci: honor a repository-variable override for the push gateway image - #4722

Open
jeremylongshore wants to merge 1 commit into
block:mainfrom
intent-solutions-io:contrib/push-gateway-image-override
Open

ci: honor a repository-variable override for the push gateway image#4722
jeremylongshore wants to merge 1 commit into
block:mainfrom
intent-solutions-io:contrib/push-gateway-image-override

Conversation

@jeremylongshore

Copy link
Copy Markdown

Summary

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 this file" (the env block's own words). The push gateway jobs predate that pattern and hardcode ghcr.io/block/buzz-push-gateway in 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 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 (both sides equal the fork), so it doesn't prevent this.

This adds PUSH_GATEWAY_IMAGE with the identical override shape (GHCR_PUSH_GATEWAY_IMAGE, defaulting to ghcr.io/block/buzz-push-gateway) and references it everywhere the literal appeared, mirroring how the relay job uses IMAGE_NAME (yaml positions via ${{ env.* }}, run blocks via step env:). 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

  • actionlint clean on the modified workflow; YAML parses.
  • Grep proof: the only remaining ghcr.io/block/buzz-push-gateway literal is the env default.
  • The failure being fixed, observed on our fork of current main: Build public push gateway dies at cache export with denied: permission_denied — builds green, fails only at the block-namespace cache write.
  • No behavior change for block/buzz itself: with GHCR_PUSH_GATEWAY_IMAGE unset, every reference resolves to the exact prior literal.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: push-gateway jobs hardcode ghcr.io/block, breaking docker workflows on every fork

1 participant