Skip to content

Publish images through GHCR and the image mirror - #78

Merged
samcm merged 2 commits into
masterfrom
image-mirror
Nov 23, 2026
Merged

samcm merged 2 commits into
masterfrom
image-mirror

Conversation

@samcm

@samcm samcm commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Releases no longer need a Docker Hub token.

  • Goreleaser pushes to ghcr.io/ethpandaops/lab-backend with the job's own GITHUB_TOKEN.
  • An Attest images step in the release job attests the pushed digests. A separate mirror job then asks the image mirror to copy exactly those digests to docker.io/ethpandaops/lab-backend, and only goes green once they're on Docker Hub. If the mirror fails, "Re-run failed jobs" retries only the mirror and never rebuilds the images.
  • goreleaser-cross gets only the GHCR login (~/.docker/config.json, read-only), so images keep the Docker v2 format they had before.
  • The Docker Hub image names and tags are unchanged.

Goreleaser only pushes lab-backend here (not lab), so there's one mirror step. Releases started by repository_dispatch or workflow_dispatch attest from the default branch rather than a tag.

Once a release has gone through, the repo's DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets can be removed.

Same approach as ethpandaops/ethereum-address-metrics-exporter#70 (its release v1.1.2-imagemirror went through end to end) and ethpandaops/ethereum-address-metrics-exporter#71, which moved the mirror into its own job. Needs the IMAGE_MIRROR_URL organization secret, which is already in place.

@samcm
samcm requested a review from mattevans as a code owner November 21, 2026 14:04

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switches image publishing from direct Docker Hub pushes to GHCR plus a goreleaser→image-mirror handoff, and moves goreleaser's image templates/manifests to ghcr.io, with Docker Hub names and tags unchanged. I checked the pinned mirror-image action source (public) against the inputs, permissions and artifact shape used here, and against the goreleaser config: one image name, matching inputs, correct token scopes, and the newer pin only adds the per-tag dedupe fix. No real problems found.


Reviewed 2 changed file(s) @ c2e34e50 — no blocking issues found.
Red pandas are famous zoo escape artists. Never trust a default-deny that hasn't been tested.

…ding

Also mount only the docker config into goreleaser-cross, so images keep
the Docker v2 format they had before.
@samcm
samcm merged commit 2c07687 into master Nov 23, 2026
3 checks passed
@samcm
samcm deleted the image-mirror branch November 23, 2026 02:15
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.

1 participant