From c37eb15d753d2828692c70c3ae0e3df2ad2280d7 Mon Sep 17 00:00:00 2001 From: Michiel VH <105451808+michielvha@users.noreply.github.com> Date: Wed, 25 Nov 2026 11:21:37 +0100 Subject: [PATCH] fix(release): resolve the image digest without a broken pipe The digest step piped a paginated gh api call into head -1 under set -o pipefail. head exits at the first match while gh is still paginating, gh then dies of SIGPIPE, and the step fails with exit 141 although the digest was found. sed -n 1p reads every page instead. --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85b86dd..111281e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,9 +107,11 @@ jobs: run: | set -euo pipefail # Container packages owned by an org → /orgs//packages + # sed reads every page; head -1 would exit at the first match while gh is still + # paginating, and gh's SIGPIPE then fails the step under pipefail (exit 141). digest=$(gh api --paginate \ "/orgs/vhco-pro/packages/container/${REPO_NAME}/versions" \ - --jq ".[] | select(.metadata.container.tags[]? == \"${TAG}\") | .name" | head -1) + --jq ".[] | select(.metadata.container.tags[]? == \"${TAG}\") | .name" | sed -n 1p) if [ -z "${digest}" ]; then echo "::error::Could not resolve digest for ${REPO_NAME}:${TAG}" exit 1