Skip to content

fix: prevent amd64-pinned digest breaking arm64 builds - #2

Closed
saubhikdattagithub wants to merge 1 commit into
mainfrom
fix/build_fail
Closed

fix: prevent amd64-pinned digest breaking arm64 builds#2
saubhikdattagithub wants to merge 1 commit into
mainfrom
fix/build_fail

Conversation

@saubhikdattagithub

@saubhikdattagithub saubhikdattagithub commented Aug 18, 2026

Copy link
Copy Markdown

Problem

The reusable package-build workflow resolves the container image digest in the source job, which runs on amd64. This pins an amd64-specific digest into .container:

ghcr.io/gardenlinux/repo-debian-snapshot@sha256:bc2f213f...  # amd64 digest

This file is uploaded as an artifact and reused by the arm64 binary job, which then pulls the amd64-specific digest on an arm64 runner, causing:

WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64)
Exec format error

Fix

Add a .container file with just the image name (no digest). The reusable workflow only resolves the digest if [ ! -e .container ], so this skips the amd64-pinning step. Each binary job then runs podman run --arch $arch ... which resolves the correct platform manifest directly from the registry.

The reusable build workflow resolves the container image digest in the
source job (which runs on amd64). This pins an amd64-specific digest
into .container, which is then reused by the arm64 binary job — causing
"image platform (linux/amd64) does not match expected platform (linux/arm64)"
and an Exec format error.

By providing .container with just the image name (no digest), the
source job's resolve step is skipped (`if [ ! -e .container ]`), and
each binary job's `podman run --arch $arch` resolves the correct
platform manifest directly from the registry.

Signed-off-by: Saubhik Datta <50126327+saubhikdattagithub@users.noreply.github.com>
@saubhikdattagithub
saubhikdattagithub marked this pull request as ready for review August 18, 2026 06:08
@saubhikdattagithub saubhikdattagithub self-assigned this Aug 18, 2026
@saubhikdattagithub

Copy link
Copy Markdown
Author

Closing - root cause is an intermittent GitHub Actions arm64 runner issue (missing QEMU binfmt), not a code problem. Builds recover automatically the next day.

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