[ci] Fail CI Status job when workflow is cancelled (#17024)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jesse Hills
2026-06-18 15:02:22 +12:00
committed by GitHub
parent b6763cfaed
commit 3a1a8a8955

View File

@@ -1369,4 +1369,7 @@ jobs:
# 1. The target branch has a build issue independent of this PR # 1. The target branch has a build issue independent of this PR
# 2. This PR fixes a build issue on the target branch # 2. This PR fixes a build issue on the target branch
# In either case, we only care that the PR branch builds successfully. # In either case, we only care that the PR branch builds successfully.
echo "$NEEDS_JSON" | jq -e 'del(.["memory-impact-target-branch"]) | all(.result != "failure")' # Every other job must have succeeded or been skipped; a "cancelled" or
# "failure" result fails this check so CI is not reported green when the
# workflow was cancelled.
echo "$NEEDS_JSON" | jq -e 'del(.["memory-impact-target-branch"]) | all(.result == "success" or .result == "skipped")'