fix(ci): restore multi-arch container builds in release workflow#538
Merged
Conversation
The Publish Container Images job has been failing since v0.44.1 (visible again on the v0.45.0 release as "Could not resolve digest for ghcr.io/slashdevops/idp-scim-sync:v0.45.0") because the arm64 image is never produced. Root cause: when the workflow was migrated from Docker to Podman in ab22744, docker/setup-qemu-action was removed on the assumption that pre-built binaries no longer needed cross-compilation. They don't, but every RUN line in Containerfile (apk add ca-certificates, etc.) still executes under the target architecture, which on an amd64 runner requires QEMU user-mode emulation registered with binfmt_misc. Without it, `podman build --platform linux/arm64` exits with "exec /bin/sh: Exec format error", no arm64 image is created, container-publish then fails to add it to the manifest, and cosign finally fails to resolve the (never-pushed) digest. The two upstream make failures were not surfaced as red steps because `make ... | tee $GITHUB_STEP_SUMMARY` runs under bash without pipefail, so tee's exit 0 masked the make exit 1. Changes: * Install qemu-user-static and binfmt-support alongside podman so the kernel can run arm64 binaries during the build. * Add `defaults.run.shell: bash -eo pipefail {0}` at the job level so future `cmd | tee ...` failures fail the step instead of being silently swallowed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Fixes the
Publish Container Imagesjob in the release workflow, which has been failing since v0.44.1 and surfaced again on the v0.45.0 release as "Could not resolve digest for ghcr.io/slashdevops/idp-scim-sync:v0.45.0".Root cause
When the workflow was migrated from Docker to Podman in
ab22744("fix: replace Docker with Podman and simplify container image publishing"), thedocker/setup-qemu-actionstep was removed on the assumption that pre-built binaries no longer needed cross-compilation.They don't — but every
RUNline inContainerfile(notablyapk add --no-cache --update ca-certificates) still executes under the target architecture. On theamd64runner, building thearm64variant therefore needs QEMU user-mode emulation registered withbinfmt_misc. Without it:podman build --platform linux/arm64died withexec /bin/sh: Exec format error.…-linux-arm64image was created in local storage.make container-publishthen failed:podman manifest addcould not find the arm64 image.cosign signfinally turned the job red with "Could not resolve digest for ghcr.io/slashdevops/idp-scim-sync:v0.45.0".The two upstream
makefailures were not surfaced as red steps becausemake ... | tee $GITHUB_STEP_SUMMARYruns underbashwithoutpipefail, sotee's exit0maskedmake's exit1. That's why the job summary showed✓ Make container-build,✓ Make container-publish, and only the final✗ Cosign sign …step turned red.Changes
In
.github/workflows/container-image.yml:qemu-user-staticandbinfmt-supportalongsidepodmanso the kernel can execute arm64 binaries during the build.defaults.run.shell: bash -eo pipefail {0}at the job level so futurecmd | tee ...failures fail the step instead of being silently swallowed.Plus a
Whats-New.mdentry under Unreleased.No code or release-artifact changes; the multi-arch image set and signing flow are unchanged.
Test plan
Publish Container Imagesjob:…-linux-amd64and…-linux-arm64images.ghcr.io/slashdevops/idp-scim-sync:<tag>and:latest.Container Imageworkflow viaworkflow_dispatchafter merge to validate without a tag.🤖 Generated with Claude Code