ci: build multi-arch images via QEMU (no ARM64 runner needed)#86
Conversation
The arm64 build jobs required a [self-hosted, Linux, ARM64] runner that does not exist (only watchtower-cashpilot, an X64 runner, is registered), so build-ui-arm64 / build-worker-arm64 queued forever and the manifest job never published a multi-arch image (v0.6.12's arm64 jobs are still stuck for the same reason). Replace the 4 per-arch jobs + manifest-merge with one QEMU-emulated buildx job per image that builds linux/amd64,linux/arm64 together and pushes the multi-platform manifest directly under all tags. runs-on stays [self-hosted, Linux, X64] so GitHub schedules whichever X64 runner (watchtower / geiserback) is free.
📝 WalkthroughWalkthroughThe workflow consolidates multi-architecture Docker image builds into single jobs using Docker Buildx. Previous separate amd64 and arm64 jobs for UI and worker services, plus a manifest aggregation job, are replaced with unified ChangesMulti-architecture Build Jobs
🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build.yml (1)
91-92: 💤 Low valueConsider hardening action references (optional).
Static analysis flags two issues on the new/changed checkout and QEMU steps:
persist-credentials: false: Prevents Git credentials from persisting in subsequent steps. Defensive measure when credentials aren't needed post-checkout.- Pinning to SHA: Version tags can be force-pushed; pinning to commit hash mitigates supply-chain risk.
Same pattern exists in the lint job, so this is pre-existing—flagging for awareness, not as a blocker.
Example hardening
- uses: actions/checkout@v6 + with: + persist-credentials: false - uses: docker/setup-qemu-action@v3For SHA pinning, you'd replace
@v6/@v3with the full commit hash (e.g.,@<sha>). This adds maintenance overhead for updates.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build.yml around lines 91 - 92, Update the two action steps that use actions/checkout@v6 and docker/setup-qemu-action@v3: add persist-credentials: false to the checkout step to avoid leaking Git creds, and replace the loose tags (`@v6`, `@v3`) with the corresponding commit SHA pins for both actions (i.e., pin actions/checkout and docker/setup-qemu-action to their specific commit hashes) so the workflow references immutable commits rather than mutable tags.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/build.yml:
- Around line 91-92: Update the two action steps that use actions/checkout@v6
and docker/setup-qemu-action@v3: add persist-credentials: false to the checkout
step to avoid leaking Git creds, and replace the loose tags (`@v6`, `@v3`) with the
corresponding commit SHA pins for both actions (i.e., pin actions/checkout and
docker/setup-qemu-action to their specific commit hashes) so the workflow
references immutable commits rather than mutable tags.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 235a92cb-953d-4510-b83a-f017159cd8ed
📒 Files selected for processing (1)
.github/workflows/build.yml
Problem
The release Docker build never publishes a multi-arch image. The
build-ui-arm64/build-worker-arm64jobs requireruns-on: [self-hosted, Linux, ARM64], but the only registered runner iswatchtower-cashpilot(X64). Those jobs queue forever, and themanifestjob (which needs all 4 arch jobs) never runs. v0.6.12's arm64 jobs are still stuck weeks later for the same reason — so the published:latest/:x.y.ztags were only ever the per-arch-amd64/-arm64suffixed images, never a merged manifest.Fix
Replace the 4 per-arch jobs + manifest-merge with one QEMU-emulated buildx job per image that builds
linux/amd64,linux/arm64together and pushes the multi-platform manifest directly under all tags (:latest,:x.y.z,:x.y). Addsdocker/setup-qemu-action@v3.runs-on: [self-hosted, Linux, X64]so GitHub schedules whichever X64 runner (watchtower / geiserback) is free.build-push-actionproduces the manifest natively when pushing multiple platforms, so the separatemanifestjob is removed.Notes
python:3.14-alpineis multi-arch; Dockerfiles have no hardcoded-arch downloads, so arm64 builds cleanly under emulation.Test plan
cashpilotandcashpilot-workerdocker manifest inspect drumsergio/cashpilot:latestshows both amd64 + arm64Summary by CodeRabbit
Release Notes