ci: fix QEMU binfmt registration for arm64 cross-build #18
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/m1-image-distribution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The previous binfmt registration installed handlers for
linux/amd64,linux/arm64. Listing the native arch alongside the foreign one tripped Forgejo's runner into binding the wrong QEMU emulator under/proc/sys/fs/binfmt_misc/qemu-aarch64, so when buildx ran the arm64 stage it tried to execute the arm64/bin/shthrough an amd64 emulator and bailed out with.buildkit_qemu_emulator: /bin/sh: Invalid ELF image for this architecture.Replaces the explicit platform list with the canonical
--install allinvocation (the same one docker/setup-qemu-action@v3 uses internally), preceded by--uninstall 'qemu-*'to flush any stale registrations from earlier jobs on the same runner, and followed by a no-argtonistiigi/binfmtrun that prints the resulting handler table for diagnostics.Also adds
docker buildx rm multiarch || truebefore the create step so a previous run's broken builder container doesn't get reused and shadow the freshly-registered handlers.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com