Skip to content

ci: build docker images for PRs labelled build-docker-image - #270

Merged
pk910 merged 1 commit into
masterfrom
pr-docker-builds
Nov 18, 2026
Merged

pk910 merged 1 commit into
masterfrom
pr-docker-builds

Conversation

@pk910

@pk910 pk910 commented Nov 18, 2026

Copy link
Copy Markdown
Member

Adds the labelled-PR docker build we already have in dora and other tools. Until now checkpointz images were only built by goreleaser on tags (or through a release/* branch).

How it works

  • A PR labelled build-docker-image gets an image on every push, and when the label is added.
  • Tags: ethpandaops/checkpointz:<branch> and ethpandaops/checkpointz:<branch>-<short sha>, for linux/amd64 and linux/arm64.
  • The workflow can also be dispatched manually with a custom tag.
  • PRs from forks are skipped: the workflow runs on pull_request, so they have no registry secrets. Dispatch it manually to publish a build of a fork branch.
  • Tags that look like release tags (master, latest, *-latest, versions) are refused.

Build

The image uses the same goreleaser-scratch.Dockerfile as releases. The web frontend and both binaries are built on the runner (CGO_ENABLED=0, cross-compiled), and the Dockerfile only copies the binary, so no emulation is needed. The existing goreleaser release flow is untouched.

It builds the PR head commit, not the PR/master merge commit.

Testing

Build steps run locally (binaries for both architectures, image built from the release Dockerfile and started). The workflow itself has not run in CI yet; labelling this PR will exercise it and publish ethpandaops/checkpointz:pr-docker-builds.

@pk910
pk910 requested a review from samcm as a code owner November 18, 2026 10:27

@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.

Summary

Adds a labelled-PR Docker workflow that builds the PR head on the runner (web assets + static binaries for amd64/arm64) and pushes branch-tagged images with the release Dockerfile, mirroring the dora pattern. The build itself checks out: make build-web runs before go build (required for //go:embed build/*), the dist-docker/linux/<arch>/checkpointz layout matches COPY $TARGETPLATFORM/checkpointz*, and the tag guard covers both v-prefixed and goreleaser-normalised version tags. The problems I found are confined to the manual-dispatch/documentation claims.

Issues

  • 🟢 .github/workflows/build-dev.yaml:8 — manual dispatch cannot reach a fork branch — see the thread on that line
  • 🟢 .github/workflows/build-dev.yaml:51 — dispatch from a tag ref yields a mangled default tag — see the thread on that line

Reviewed @ c7e8f0fe
"If you don't have time to do it right, when will you have time to do it over?" — John Wooden

Comment thread .github/workflows/build-dev.yaml Resolved
Comment thread .github/workflows/build-dev.yaml Resolved
@pk910
pk910 merged commit 38eef90 into master Nov 18, 2026
7 of 12 checks passed
@pk910
pk910 deleted the pr-docker-builds branch November 18, 2026 10:37
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.

4 participants