Repository navigation
ci: publish a multi-arch container image to GHCR - #95
Open
jonasgrosch wants to merge 1 commit into
Open
jonasgrosch wants to merge 1 commit into
jonasgrosch wants to merge 1 commit into
Conversation
Builds the Containerfile for linux/amd64 and linux/arm64, each natively on a runner of its own architecture (no emulation), and merges both into one tag under ghcr.io/<owner>/<repo>. The repository's default branch publishes latest, <branch> and sha-<short>; version tags v* publish <version> and <major>.<minor>. Pull requests that touch the build inputs build both architectures without pushing, so a broken Containerfile shows before merge. Other branch pushes do nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
walgit ships a
Containerfilebut no published image, so every deployment builds its own. Thisadds
.github/workflows/image.yml, which publishesghcr.io/<owner>/<repo>:linux/amd64onubuntu-24.04andlinux/arm64onubuntu-24.04-arm, each pushed by digest, then merged into one multi-arch tag withdocker buildx imagetools create. No QEMU — an emulated release build of this workspace isfar slower than a native one.
latest,<branch>,sha-<short>. Tagsv*:<version>and<major>.<minor>. Other branch pushes do nothing.Containerfile,Cargo.*,crates/**,web/**,the workflow) build both architectures without pushing, so a broken Containerfile is caught
before merge.
docker/metadata-action(image.source,image.revision),WALGIT_BUILD_SHApassed as the build arg the Containerfile already reads, BuildKit attestations.type=ghaper platform.Only GitHub-owned and Docker's verified actions;
permissions: contents: readat the top,packages: writeonly on the two jobs that push. actionlint-clean.Tested on a fork: run conxai-technologies/walgit#36764429797 — amd64 14m51s, arm64 13m29s,
merge 22s;
ghcr.io/conxai-technologies/walgit:sha-3d1e502pulls anonymously on botharchitectures and
walgit --versionreports the commit.One thing for you: a new GHCR package in a user or org account starts private; after the first
publish it needs "Change visibility → Public" once in the package settings.
Part of #94.
🤖 Generated with Claude Code