Repository navigation
ci: publish the tested image to ghcr on every push to master - #4
Merged
Merged
Conversation
One build per commit, reused by the test jobs and then pushed, so nothing reaches the registry that has not rendered, booted and served traffic. The step summary names the digest read back from the registry, since a tag moves and a consumer pins. Assisted-by: Claude:claude-opus-5[1m]
jclaveau
force-pushed
the
ci/publish-to-ghcr
branch
from
August 14, 2026 14:45
c23a0b3 to
a0c2fd0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Railway can build this repo's Dockerfile itself, but that means compiling pgbouncer from source at deploy time, in every environment — and a PR on a Railway-linked repo clones the whole project, so the same build repeats per preview. One build per commit, pulled everywhere, is cheaper and faster.
The job pushes the image the tests just ran, not a rebuild of the same commit:
buildalready saves it as an artifact forrendered-configandlive, sopublishdownloads that same tar and pushes it. Nothing reaches the registry that has not rendered its config, booted, and served traffic on both Postgres majors — and there is no second build to disagree with the first.Three tags per commit:
latestsha-<short><pgbouncer version>-<short>, read fromARG VERSIONin the DockerfileThe third is the one I would deploy: the image's identity is really (pgbouncer version, entrypoint commit), so a
VERSIONbump is legible from the tag alone, and a rollback is one variable change.latestis there for humans and for trying out Railway's image-based deploys.Only on
master, and only onpush— pull requests already run the whole suite, and publishing every branch would fill the registry with images nobody deploys.Deliberately amd64 only.
make pushbuildslinux/arm64,linux/amd64, and arm64 under QEMU on a GitHub runner is roughly ten times slower for a source compile. Railway is amd64; the multi-arch target stays available for manual use.Rebased onto
masternow that #2 has landed, so the green above covers the entrypoint that is actually there rather than the one this branch forked from. Three changes rode along:ARG VERSIONis guarded — an unread one would have tagged the image-<short>and pushed that without a wordimagetools inspect, since a tag moves and a consumer pinsenv:rather than being interpolated into itTwo things to check after the first run, which I could not settle beforehand:
ghcr.io/jclaveau/docker-pgbouncer), which is usually enough for GitHub to associate the two. The explicit mechanism is anorg.opencontainers.image.sourcelabel, which would mean adding aLABELto the Dockerfile — happy to do that if the association does not appear on its own.Assisted-by: Claude:claude-opus-5[1m]