From 0f5a2964a8d4e7e2448afc676674ea544bdf11f0 Mon Sep 17 00:00:00 2001 From: Jinsoo Heo Date: Tue, 30 Jun 2026 19:49:40 +0900 Subject: [PATCH] ci: pin-gate fail closed on git-diff error (mirror app-of-apps#1624) --- .github/workflows/chronicle-image-pin-gate.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chronicle-image-pin-gate.yml b/.github/workflows/chronicle-image-pin-gate.yml index 97f5233..98abd2f 100644 --- a/.github/workflows/chronicle-image-pin-gate.yml +++ b/.github/workflows/chronicle-image-pin-gate.yml @@ -66,8 +66,11 @@ jobs: echo "pin-gate self-test passed (10 cases)" # --- gate: render each changed chart, flag unpinned/malformed chronicle images --- - changed=$(git diff --name-only "${BASE_SHA}...HEAD" -- 'charts/**' \ - | sed -nE 's#^(charts/[^/]+)/.*#\1#p' | sort -u) + if ! changed=$(git diff --name-only "${BASE_SHA}...HEAD" -- 'charts/**' \ + | sed -nE 's#^(charts/[^/]+)/.*#\1#p' | sort -u); then + echo "::error::pin-gate could not compute the PR diff against ${BASE_SHA}; refusing to pass without a verifiable diff (fail-closed)" + exit 1 + fi if [ -z "$changed" ]; then echo "No chart changes."; exit 0; fi fail=0 while IFS= read -r chart; do