Fix all-good script

This commit is contained in:
Konstantin Wohlwend 2025-06-17 09:28:10 -07:00
parent 02267b43c8
commit 2bcbe01ea5

View File

@ -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