From 2bcbe01ea56507a5285866ed6da3371de90acded Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Tue, 17 Jun 2025 09:28:10 -0700 Subject: [PATCH] Fix all-good script --- .github/workflows/all-good.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/all-good.yaml b/.github/workflows/all-good.yaml index 101ba521b..fd3c45e9e 100644 --- a/.github/workflows/all-good.yaml +++ b/.github/workflows/all-good.yaml @@ -98,7 +98,13 @@ jobs: echo "All check runs passed!" exit 0 else - echo "Some check runs failed. Exiting with error." + echo "The following check run(s) failed:" + # Failed checks on the current commit + echo "$commit_response" | jq -r '.check_runs[] | select(.conclusion != "success") | .name' | sed 's/^/ - /' + # Failed checks on the PR head commit (if different) + if [ -n "$PR_HEAD_SHA" ] && [ "$PR_HEAD_SHA" != "$COMMIT" ]; then + echo "$pr_response" | jq -r '.check_runs[] | select(.conclusion != "success") | .name' | sed 's/^/ - /' + fi exit 1 fi done