Repository navigation
Publish images through GHCR and the image mirror - #272
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a1fe9d-1fe0-74e3-a495-ee80245a4289 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Moves both workflows to push to ghcr.io/ethpandaops/checkpointz and delegate Docker Hub publishing to the image mirror: the release job now runs on ubuntu-latest, attests goreleaser's pushed digests, and a separate mirror-only job copies exactly those digests; build-dev also pushes to GHCR then attests and mirrors its two tags. I traced the release flow against the pinned ethpandaops/actions/mirror-image source and goreleaser's dockers_v2 artifact emission (type/name/extra.Digest all match the action's artifacts filter, and artifacts.json is written after publishing), and the dev flow's env/tag/digest plumbing; I found no functional problem.
Reviewed 3 changed file(s) @ ff99ffbc — no blocking issues found.
"Beware of bugs in the above code; I have only proved it correct, not tried it." — Donald Knuth
Releases no longer need a Docker Hub token.
self-hosted-ghr,size-l-x64) toubuntu-latest. Nothing in the build steps needs the self-hosted runner.ghcr.io/ethpandaops/checkpointzwith the job's ownGITHUB_TOKEN.Attest imagesstep in the release job attests the pushed digests. A separatemirrorjob then asks the image mirror to copy exactly those digests todocker.io/ethpandaops/checkpointz, 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.build-dev.yaml(labelled PR builds and manual dispatches) now pushes to GHCR too, then attests the pushed digest and mirrors its two tags in the same job.Heads-up, not changed here:
build-dev.yamlpublishes images tagged with the PR branch name. It runs onpull_request(notpull_request_target), only for same-repo branches with thebuild-docker-imagelabel, and refusesmaster/latest/version-like tags, so that's unchanged; just flagging it.Once a release has gone through, the repo's
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets can be removed. Nothing in this repo uses them after this PR.Same approach as ethpandaops/ethereum-address-metrics-exporter#70 and ethpandaops/ethereum-address-metrics-exporter#71, which went through end to end on real releases. Needs the
IMAGE_MIRROR_URLorganization secret, which is already in place.