ci: use native arm64 runners for multi-arch Docker builds#531
Merged
Conversation
Replace QEMU-emulated arm64 builds with native ubuntu-24.04-arm runners to dramatically speed up multi-arch Docker image builds. The UI (Next.js) build was taking 40+ minutes under QEMU; native builds should complete in under 10 minutes. Changes: - Split reusable workflow into parallel build (per-platform) + merge jobs - amd64 builds on ubuntu-latest, arm64 builds on ubuntu-24.04-arm - Merge job creates multi-arch manifest via docker buildx imagetools - Cache scopes split per platform to avoid cross-arch pollution - Add optional `file` input for custom Dockerfile paths - Refactor admin-release.yaml to reuse the shared workflow
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.
Why we need this PR?
Multi-arch Docker builds (amd64 + arm64) use QEMU emulation on x86 runners, making arm64 builds extremely slow. The UI (Next.js) release was stuck for 40+ minutes because
npm ci+next buildunder QEMU is ~5-10x slower than native. This affects all components using the reusable Docker release workflow.Describe your solution
Replace QEMU-emulated builds with native arm64 runners (
ubuntu-24.04-arm), building each platform in parallel on its native architecture, then merging into a multi-arch manifest._reusable-docker-release.yaml:build-and-pushjob intobuild(matrix) +mergejobsbuildmatrix: amd64 onubuntu-latest, arm64 onubuntu-24.04-arm— both run in parallelsha-<sha>-amd64)mergejob usesdocker buildx imagetools createto combine into multi-arch manifestimage-amd64/image-arm64) to avoid cross-arch pollutionfileinput for custom Dockerfile pathsadmin-release.yaml:_reusable-docker-release.yaml(21 lines)file: ./src/server/api/go/Dockerfile.adminvia the new inputImplementation Tasks
_reusable-docker-release.yamlwith matrix strategy + native runnersfileinput to reusable workflow for custom Dockerfile pathsadmin-release.yamlto use the reusable workflowImpact Areas
Checklist
devbranch.