Repository navigation
Publish images through GHCR and the image mirror - #35
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 image publishing to GHCR for releases and master builds, with attestation and a mirror step that copies digests to Docker Hub (release mirrors are split into their own re-runnable job). The workflows follow the documented mirror-image pattern (matching the proven ethpandaops implementations) and the action inputs/outputs/permissions line up at the pinned SHA; the known limitations (self-hosted binary compilation, GoReleaser Pro config) are disclosed in the PR description.
Reviewed 3 changed file(s) @ 2e0a20e0 — no blocking issues found.
"Async by default."
Amp-Thread-ID: https://ampcode.com/threads/T-01a1fe9d-1fe0-74e3-a495-ee80245a4289 Co-authored-by: Amp <amp@ampcode.com>
CI failed @
|
Releases and master builds no longer need a Docker Hub token, and the release workflow now works with OSS goreleaser.
Release workflow (
goreleaser.yaml)ubuntu-latest. The self-hostedbuildmatrix (cross buildper target, then an artifact hand-off) is gone.rustbuilder instead ofbuilder: prebuilt, which only GoReleaser Pro supports while the workflow ran OSS goreleaser. It cross-compilesx86_64-unknown-linux-gnuandaarch64-unknown-linux-gnuwithcargo zigbuildon the runner. The job installs clang and llvm (for the BPF programs inbuild.rs), Zig 0.14.1 and cargo-zigbuild 0.24.1.GIT_COMMITis still set from the commit..2.28glibc suffix, so the binaries need glibc 2.28 or newer whatever the runner's glibc is. They run on thedebian:bookworm-slimimage.observoorrather thanobservoor-<version>, because the rust builder takes the binary from cargo's output. The image Dockerfile copiesobservoor*, so the images are unaffected.ghcr.io/ethpandaops/observoorwith 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/observoor, 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.master-build.yamlpushesmasterandmaster-<sha>to GHCR, then attests the pushed digest and mirrors both tags in the same job. Runs now queue instead of overlapping, since every run movesmaster.The Docker Hub image names and tags are unchanged.
Tested: a copy of the release job ran on
ubuntu-latestagainst a local registry (tagv99.0.0, GitHub release disabled). Both binaries built, both need at mostGLIBC_2.28, all five tags were pushed (99.0.0-amd64,99.0.0-arm64v8,99.0.0,99.0.0-arm64,latest), and both platform images started and printed their usage. OSSgoreleaser checknow passes; on master it rejects the config.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.