fix(ci): build arm64 images on native arm64 runner#357
Open
juandelperal wants to merge 1 commit into
Open
Conversation
The per-arch build matrix was running the arm64 leg under QEMU on ubuntu-latest. Since multi-arch was introduced in peaberry-studio#270, no `*-arm64` tag has ever surfaced on GHCR despite `infra/deploy/README.md`, `apps/web/README.md`, and both `.env.example` files instructing users to pull them. arm64 hosts that follow the docs get `manifest unknown`. Switch the arm64 leg to GitHub's free native `ubuntu-24.04-arm` runner (public-repo GA since early 2026) so the build actually completes, and drop the now-redundant QEMU setup step. Move the PR-image comment into a separate `comment-pr` job that `needs:` the full build matrix so we only advertise tags when every arch actually published. Update the wording from "Optional arm64" to plain "arm64" since both arches are now reliably built.
Contributor
|
Thanks for the contribution Juan! @albertoperdomo2 could you please check this out? |
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.
Summary
Multi-arch image builds were introduced in #270 (April 2026), but no
*-arm64tag has ever been published to GHCR. Every release since then has shipped without arm64, and the docs/.env.examplefiles that tell users to pull:latest-arm64are silently broken:Direct registry probe confirms zero
*-arm64tags exist on eitherpeaberry-studio/arche/weborpeaberry-studio/arche/workspace:Root cause:
.github/workflows/build-push.ymlandbuild-push-workspace.ymlbuild the arm64 leg under QEMU onubuntu-latest. The Next.js + Prisma build is OOM-ing / timing out under emulation, butfail-fast: falsekeeps the amd64 leg green, so release tags get cut and the failure is invisible unless you open the Actions UI.Changes
ubuntu-latestarm64 leg with GitHub's free public-repoubuntu-24.04-armrunner. Drop the now-redundantdocker/setup-qemu-action@v3step. Tag scheme is unchanged —:latest/:vX.Y.Zstay amd64-default and-amd64/-arm64suffix tags remain published, so no consumer pins need to change.-arm64tag regardless of whether arm64 actually built. Moved it to acomment-prjob thatneeds:the full matrix, so the comment only appears when every arch published successfully. Rewrote the body from"Optional arm64"to plain"arm64"now that both arches are reliably built.No code, docs, or
.env.examplechanges were needed — the docs were already accurate in intent; the CI just wasn't delivering on them.Why native runner instead of a multi-arch manifest
Considered (option 1a from the issue): single buildx step pushing
--platform linux/amd64,linux/arm64into one manifest list, dropping the arch suffixes. Rejected because::vX.Y.Z-amd64consumer that exists on GHCR today.Why no change to
build-and-deploy.ymlRe-checked the deploy flow.
deploy: needs: [build-web, build-workspace]already correctly blocks deploy when any matrix entry fails —fail-fast: falseonly controls cancellation of sibling matrix entries, not the overall job result. The "silent release" described in the original issue happens on tag pushes (v*.*.*), which triggerbuild-push.ymldirectly and never involvebuild-and-deploy.yml. The git tag is created manually by a maintainer regardless of CI outcome, so the missing safeguard is really "don't let arm64 fail in the first place" — which this PR achieves.Test plan
Build & Push Web ImageandBuild & Push Workspace Imageworkflows on this branch viaworkflow_dispatchand confirm bothamd64andarm64matrix legs succeed.actionlintis clean (verified locally).ghcr.io/peaberry-studio/arche/web:<tag>-arm64exists.ghcr.io/peaberry-studio/arche/workspace:<tag>-arm64exists.docker pull --platform linux/arm64 ghcr.io/peaberry-studio/arche/web:<tag>-arm64works on an arm64 host.comment-prjob with the updated wording, and that it only fires when both arches actually built.