Skip to content

ci: add multi-arch ARM64 support using native runners#34

Open
soile1991 wants to merge 1 commit into
clucraft:mainfrom
soile1991:feature/arm-docker-support
Open

ci: add multi-arch ARM64 support using native runners#34
soile1991 wants to merge 1 commit into
clucraft:mainfrom
soile1991:feature/arm-docker-support

Conversation

@soile1991
Copy link
Copy Markdown

@soile1991 soile1991 commented Apr 21, 2026

Problem

The CI workflow only built linux/amd64 images. Two attempts were made with QEMU emulation but both failed:

  • QEMU SIGILL crash — Node.js V8 JIT generates CPU instructions that QEMU user-mode emulation mis-handles, causing a fatal Illegal instruction crash during npm install on the emulated arm64 layer.

Solution

Use GitHub's native ubuntu-24.04-arm runner for the ARM64 build — no emulation at all.

How it works

Each image is built in a matrix across two native runners:

Platform Runner
linux/amd64 ubuntu-latest
linux/arm64 ubuntu-24.04-arm

Each job pushes its image layer by digest to GHCR. A final merge job combines both digests into a single multi-arch manifest list with docker buildx imagetools create, producing a standard manifest that transparently serves the right layer on any platform.

Other changes

  • Removes the dorny/paths-filter changes job — the on.push.paths trigger already gates the workflow to relevant changes, making the extra conditional layer unnecessary.
  • Upgrades docker/build-push-action from v5 → v6.
  • Scopes GHA cache per platform to avoid cache collisions between amd64 and arm64 build layers.

@soile1991 soile1991 force-pushed the feature/arm-docker-support branch from 75fcb07 to 8dd62a0 Compare April 21, 2026 12:32
mikeknight85 added a commit to mikeknight85/PriceStalker that referenced this pull request Apr 21, 2026
Version bump to accompany the cherry-picked multi-arch CI change from
upstream PR clucraft#34 (previous commit). Images published from v1.2.3 onward
are manifest lists covering both linux/amd64 and linux/arm64, unlocking
native runs on Apple Silicon, Raspberry Pi, AWS Graviton, etc. No change
for existing x86 users — Docker picks the right variant automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the single-job amd64-only workflow with a native runner matrix
strategy to produce proper multi-arch Docker images without QEMU.

Why QEMU doesn't work:
- Node.js V8 JIT generates instructions QEMU user-mode emulation
  mis-handles, causing SIGILL crashes during npm install on arm64.

How it works now:
- linux/amd64 builds on ubuntu-latest (native)
- linux/arm64 builds on ubuntu-24.04-arm (native GitHub ARM runner)
- Each job pushes its image by digest to GHCR
- A merge job combines both digests into a single multi-arch manifest
  list via docker buildx imagetools create

Also removes the dorny/paths-filter changes job — the on.push.paths
trigger already gates the workflow to relevant file changes, so the
extra conditional layer is unnecessary.
@soile1991 soile1991 force-pushed the feature/arm-docker-support branch from 6107b0d to fc1f78f Compare April 21, 2026 22:57
@soile1991 soile1991 changed the title ci: add multi-arch ARM64 Docker image support ci: add multi-arch ARM64 support using native runners Apr 21, 2026
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