From 134b3abdc04bdf659eefca2e16721e47d5ba2c37 Mon Sep 17 00:00:00 2001 From: Kyle Galloway Date: Fri, 29 May 2026 17:13:47 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A1=EF=B8=8F=20CI=20survived=20the=20f?= =?UTF-8?q?orce-push=20paradox=20=E2=80=94=20it=20now=20checks=20before=20?= =?UTF-8?q?it=20diffs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a tag is force-pushed, github.event.before is the old tag object SHA which no longer exists in the repo. git diff on a bad object exits 128 and kills the Detect Changes step. Fall back to listing all files when the before SHA fails git cat-file -e. --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4667b6..0302b4a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: "${{ github.event.pull_request.head.sha }}") else BEFORE="${{ github.event.before }}" - if [ "$BEFORE" = "0000000000000000000000000000000000000000" ]; then + if [ "$BEFORE" = "0000000000000000000000000000000000000000" ] || ! git cat-file -e "$BEFORE" 2>/dev/null; then FILES=$(git ls-tree -r --name-only HEAD) else FILES=$(git diff --name-only "$BEFORE" "${{ github.sha }}")