Skip to content

Publish multi-arch container images to GHCR on release - #83

Merged
lance0 merged 1 commit into
masterfrom
ghcr-publish
Jun 10, 2026
Merged

lance0 merged 1 commit into
masterfrom
ghcr-publish

Conversation

@lance0

@lance0 lance0 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the container story from #82: releases now publish a ready-to-pull multi-arch image to ghcr.io/lance0/ttl, tagged {version}, {major}.{minor}, and latest.

Design

  • No QEMU compilation: Dockerfile.release packages the prebuilt static musl binaries from the existing build matrix (staged per-arch via ARG TARGETARCH), so the docker job adds ~2 minutes to a release instead of 40+ minutes of emulated compilation
  • No credentials to manage: pushes with the built-in GITHUB_TOKEN (packages: write), sidestepping the Docker Hub secrets question — a Docker Hub mirror remains optional in the roadmap
  • New aarch64-unknown-linux-musl build target (via cross, same as the existing aarch64-gnu entry): feeds the arm64 image layer and ships as a standalone release asset for glibc-free arm64 distros. The existing aarch64-gnu asset is unchanged, so install.sh/AUR/tap are unaffected

Verification

  • aarch64-unknown-linux-musl cross-compiles clean locally (cross 0.2.5, the version CI pins) — static, stripped ELF confirmed
  • Dockerfile.release built locally against the real staged x86_64-musl binary: image runs ttl 0.19.1 --version and parses args correctly on Alpine
  • Workflow YAML validated; artifact names/paths in the docker job match the upload-artifact naming exactly
  • The arm64 image layer couldn't be exercised locally (no QEMU binfmt on this host) — it runs the identical Dockerfile path, and CI installs QEMU via setup-qemu-action; worth a glance at the docker job on the first v0.20.0 release run

The release workflow now builds an aarch64-unknown-linux-musl artifact
(also a useful standalone asset for glibc-free arm64 distros) and adds
a docker job that stages the two static musl binaries by architecture
and pushes a linux/amd64 + linux/arm64 image to ghcr.io/lance0/ttl,
tagged {version}, {major}.{minor}, and latest.

Dockerfile.release packages the prebuilt binaries instead of compiling
under QEMU emulation, keeping the docker job to ~2 minutes. Publishing
uses the built-in GITHUB_TOKEN (packages: write) - no registry
credentials to manage.
@lance0
lance0 merged commit 6dda037 into master Jun 10, 2026
5 checks passed
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