Skip to content

Commit 2cf16ba

Browse files
authored
Merge pull request #538 from slashdevops/fix/container-build-qemu-setup
fix(ci): restore multi-arch container builds in release workflow
2 parents 64cef29 + d9ae8c0 commit 2cf16ba

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

.github/workflows/container-image.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
build:
1616
name: Build and Publish Container Images
1717
runs-on: ubuntu-latest
18+
defaults:
19+
# pipefail so `make ... | tee $GITHUB_STEP_SUMMARY` propagates the
20+
# upstream make exit code instead of being swallowed by tee's exit 0.
21+
run:
22+
shell: bash -eo pipefail {0}
1823
permissions:
1924
contents: read
2025
packages: write
@@ -23,10 +28,14 @@ jobs:
2328
- name: Check out code
2429
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2530

26-
- name: Install Podman
31+
- name: Install Podman and cross-arch emulation
32+
# qemu-user-static + binfmt-support register QEMU user-mode handlers
33+
# in /proc/sys/fs/binfmt_misc so podman can RUN steps inside arm64
34+
# images on this amd64 runner (the Containerfile's `apk add` step
35+
# otherwise dies with "exec /bin/sh: Exec format error").
2736
run: |
2837
sudo apt-get update
29-
sudo apt-get install -y podman
38+
sudo apt-get install -y podman qemu-user-static binfmt-support
3039
3140
- name: Tools and versions
3241
run: |

docs/Whats-New.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ This document tracks notable changes, new features, and bug fixes across release
44

55
## Unreleased
66

7+
### CI fix: restore multi-arch container builds in the release workflow
8+
9+
Fixes the `Publish Container Images` job (failing since v0.44.1, surfaced again on the v0.45.0 release as ["Could not resolve digest for ghcr.io/slashdevops/idp-scim-sync:v0.45.0"](https://github.com/slashdevops/idp-scim-sync/actions/runs/26356807875/job/77585211704)).
10+
11+
**Root cause.** When the workflow was migrated from Docker to Podman in `ab22744`, the `docker/setup-qemu-action` step was removed on the assumption that pre-built binaries no longer required cross-compilation. They don't — but every `RUN` line in `Containerfile` (notably `apk add ca-certificates`) still has to execute under the target architecture. On the `amd64` runner, building the `arm64` variant therefore needs QEMU user-mode emulation registered with `binfmt_misc`. Without it, `podman build --platform linux/arm64` died with `exec /bin/sh: Exec format error`, the `arm64` image was never created, `podman manifest add` then failed, no manifest was pushed, and `cosign sign` finally failed with "Could not resolve 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.
12+
13+
**Changes in `.github/workflows/container-image.yml`:**
14+
15+
* Install `qemu-user-static` and `binfmt-support` alongside `podman` so the kernel can run arm64 binaries during the build.
16+
* Set `defaults.run.shell: bash -eo pipefail {0}` at the job level so future `cmd | tee` failures fail the step instead of being silently swallowed.
17+
18+
No code changes; release artifacts and signing flow are unchanged.
19+
720
### SCIM members sync — major security & performance improvement (closes [#520](https://github.com/slashdevops/idp-scim-sync/issues/520))
821

922
> [!IMPORTANT]

0 commit comments

Comments
 (0)