Skip to content

ci: publish multi-arch images to GHCR - #1

Closed
ykhrustalev wants to merge 3 commits into
mainfrom
ci/ghcr-publish
Closed

ykhrustalev wants to merge 3 commits into
mainfrom
ci/ghcr-publish

Conversation

@ykhrustalev

Copy link
Copy Markdown
Member

Why

docker-image-build built both arches and discarded them (outputs: type=cacheonly, commented "Build only. Never push=true, on any branch or event"), so nothing this repository produces was consumable anywhere.

GHCR rather than Docker Hub because it authenticates with the job-scoped GITHUB_TOKEN and needs no configured secret. This repo currently has zero secrets and zero variables.

Note this publishes the image, not a wheel — wheel-smoke still builds its wheel purely to prove the bundled IFBench import works and does not persist it. Nothing in this PR changes that.

What changed

  • docker-image-build logs into ghcr.io and pushes a digest only, no tag, per arch
  • new docker-image-publish job joins the per-arch digests into one multi-arch manifest list and applies the tags, then inspects the result so a broken manifest fails in CI rather than at pull time
  • on.push gains release/**, and the pull_request base filter gains it too so a fix cherry-picked onto a release train still gets CI

Tagging inside the matrix instead would have the amd64 and arm64 runners race, each overwriting the other's tag with a single-arch image — hence the split.

Tags

ref tags on ghcr.io/liquid4all/pipette-scores
pull request pr-<n>
push to main main, <date>-<sha>
push to release/2026.08.1 2026.08.1

The image path is lowercased in release-metadata — GHCR rejects uppercase path segments and the org is Liquid4All, so github.repository cannot be used verbatim.

Verifying

This PR exercises the full push path and should publish ghcr.io/liquid4all/pipette-scores:pr-<n> as a two-arch manifest.

Worth watching on the first run: this creates the GHCR package for the first time. If the org disallows GITHUB_TOKEN creating org packages, the push fails with denied: installation not allowed to Create organization package and needs a one-time org setting — that is exactly what this PR is meant to surface before a release depends on it.

The pr-<n> tag is disposable and can be pruned after review.

There is no build-complete aggregate gate in this repo, so docker-image-publish appears as its own required-check candidate if you gate on it.

The release/** trigger is inert until such a branch exists.

🤖 Generated with Claude Code

ykhrustalev and others added 3 commits August 10, 2026 18:56
The Docker job built both arches and threw them away
(`type=cacheonly`), so nothing this repository produces was consumable.
Publish to GHCR instead: it authenticates with the job-scoped
GITHUB_TOKEN, so it needs no configured secret — this repo has none.

Each arch pushes a digest with no tag, and a new docker-image-publish
job joins the digests into one manifest list and applies the tags.
Tagging per-arch in the matrix would have the two runners race, each
overwriting the other's tag with a single-arch image.

Tags follow the ref: `pr-<n>` on a pull request, `main` plus the date+sha
version on main, and the train number on release/** (release/2026.08.1
-> 2026.08.1). The image path is lowercased because GHCR rejects
uppercase segments and the org is `Liquid4All`.

The pull_request base filter gains release/** too, so a fix
cherry-picked onto a release train still gets CI before it lands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Taking the version from the branch name pinned every push to a release
branch at the same string, so a second push could not produce a new
release. `git describe` bumps on its own instead:

  2026.08.1 -> 2026.08.1-1-g<sha> -> 2026.08.1-2-g<sha> -> ...

Each push is a distinct version, so nothing has to move a tag.

`git describe` needs the tags and the history behind them, which the
default shallow checkout fetches neither of, so release-metadata now
checks out with fetch-depth: 0.

These repositories carry no tags at all today (they were squashed), and
bare `git describe` fails outright with "No tags can describe" rather
than degrading, so an unreachable-tag fallback keeps the date+sha scheme
the repo has always used until a release train is tagged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each tag contributes two entries to TAG_ARGS (`-t` and the ref), so the
message reported "2 tag(s)" for the single pr-1 tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ykhrustalev
ykhrustalev deleted the ci/ghcr-publish branch August 10, 2026 23:26
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