Skip to content

feat: publish images to GHCR and release from release branches - #2

Merged
ykhrustalev merged 1 commit into
mainfrom
ykhrustalev/publish-multi-arch-images-to-ghcr
Aug 11, 2026
Merged

ykhrustalev merged 1 commit into
mainfrom
ykhrustalev/publish-multi-arch-images-to-ghcr

Conversation

@ykhrustalev

@ykhrustalev ykhrustalev commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Problem
docker-image-build built both architectures and discarded them (outputs: type=cacheonly), so nothing this repository produces was consumable. GHCR needs no configured secret — it authenticates with the job-scoped GITHUB_TOKEN — and this repository has none.

Solution

  • Pushes a per-architecture digest, then joins them into one multi-arch manifest in docker-image-publish
  • Pull requests build both architectures but push nothing; main pushes the image; release/** pushes it and cuts a GitHub release
  • Versions from the branch and the commit graph: 2026.08.1-3-ga1b2c3d4ab — train, distance from the branch point, commit. No clock and no pre-existing tag, so a commit always names itself the same way
  • Lowercases the image path, since GHCR rejects uppercase segments
  • Adds ci/version.sh, runnable locally to answer what a commit would publish as

Testing

  • CI green; ghcr.io/liquid4all/pipette-scores:pr-2 published as a linux/amd64 + linux/arm64 manifest before pull-request pushing was turned off, confirming the publish path end to end
  • ci/version.sh exercised across main, a fresh release branch, a release branch three commits in, after main moves, after merging main back, and a second concurrent train

@ykhrustalev
ykhrustalev force-pushed the ykhrustalev/publish-multi-arch-images-to-ghcr branch 4 times, most recently from 1394c70 to 906e7c8 Compare August 11, 2026 00:20
@ykhrustalev ykhrustalev changed the title feat: publish multi-arch images to GHCR feat: publish images to GHCR and release from release branches Aug 11, 2026
@ykhrustalev
ykhrustalev force-pushed the ykhrustalev/publish-multi-arch-images-to-ghcr branch 5 times, most recently from ce92e9b to fdda356 Compare August 11, 2026 01:36
The Docker job built both architectures and discarded them, so nothing
this repository produces was consumable. GHCR needs no configured
secret, authenticating with the job-scoped GITHUB_TOKEN.

A pull request builds both architectures to prove the Dockerfile still
works but pushes nothing: main exercises the publish path on every
merge, so repeating it per pull request only leaves package versions
behind that nobody cleans up. Main pushes the image; a push to
release/** pushes it and cuts a GitHub release.

The version is the train from the branch name, the distance from the
branch point and the commit — 2026.08.1-3-ga1b2c3d4ab. It reads no clock
and needs no pre-existing tag, so a commit always names itself the same
way, and the tag the release creates can never move because the sha is
part of it.

The naming lives in ci/version.sh so it can be run locally to answer
what a commit would publish as, rather than only inside a workflow.
@ykhrustalev
ykhrustalev force-pushed the ykhrustalev/publish-multi-arch-images-to-ghcr branch from fdda356 to cbc241d Compare August 11, 2026 01:56
@ykhrustalev
ykhrustalev merged commit 9952251 into main Aug 11, 2026
14 of 15 checks passed
@ykhrustalev
ykhrustalev deleted the ykhrustalev/publish-multi-arch-images-to-ghcr branch August 11, 2026 02:06
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