Skip to content

ci(docker): publish arm64, drop per-commit tags, prune untagged versions - #79

Open
aivuk wants to merge 1 commit into
mainfrom
ci/multiarch-and-package-retention
Open

ci(docker): publish arm64, drop per-commit tags, prune untagged versions#79
aivuk wants to merge 1 commit into
mainfrom
ci/multiarch-and-package-retention

Conversation

@aivuk

@aivuk aivuk commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Three fixes to how ghcr.io/pinheirogroup/guibiont is built and stored.

1. arm64 is now published

The image was linux/amd64 only, so every Apple Silicon Mac ran GUIbiont under qemu emulation — a large penalty for a Julia numerics workload, and likely a good share of the user base.

julia:1.12-bookworm already publishes linux/arm64/v8 and the Dockerfile is arch-neutral, so no image changes were needed. Each architecture builds on its own native runner (ubuntu-24.04-arm is free for public repos, so this avoids emulated build time) and pushes an untagged digest; a merge job joins the digests into one manifest list carrying latest / v*.

2. Per-commit tags no longer accumulate

type=sha minted a permanent sha-<short> tag on every push to main25 of the package's 27 tags by v1.1.0, none referenced by run.sh/run.ps1, each pinning ~1 GB of layers in package storage forever.

Dropped that tag rule. Traceability is preserved: the commit is still on the image as org.opencontainers.image.revision, and any build stays addressable by digest.

3. Untagged versions are pruned

The digest-based push in (1) leaves the per-arch images and their attestations as untagged package versions, which would otherwise pile up one build at a time. A cleanup job prunes them with delete-only-untagged-versions: true, so tagged versions (latest, v*) are never touched.

min-versions-to-keep: 20 is a safety margin rather than a target — the untagged versions backing the current manifest list must survive or :latest breaks. One build produces roughly four (two arches + two attestations), so 20 leaves about five builds of headroom.

Test plan

  • actionlint clean
  • Confirmed julia:1.12-bookworm publishes linux/arm64/v8
  • Cannot be verified before mergedocker.yml only triggers on push to main, so this PR does not exercise it. First run after merge should be watched.
  • After that run: docker buildx imagetools inspect ghcr.io/pinheirogroup/guibiont:latest shows both linux/amd64 and linux/arm64
  • Confirm a native arm64 pull on an Apple Silicon Mac

Not included

The 25 existing sha-* tags are untouched — this stops the bleeding but does not clean up history. Deleting published versions is destructive and irreversible, so it is left as a deliberate manual step.

The published image was linux/amd64 only, so every Apple Silicon user ran
GUIbiont under qemu — a heavy penalty for Julia numerics. Build each arch on
its own native runner (free for public repos) and join the two by digest into
one manifest list.

Package storage was also unbounded: type=sha minted a permanent sha-<short>
tag on every push to main, 25 by v1.1.0, none of them referenced by run.sh and
each holding ~1 GB of layers. Drop that tag rule — the commit is still on the
image as org.opencontainers.image.revision, and any build stays addressable by
digest — and prune untagged versions left behind by the digest-based push.
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