Update required checks: Fail if no check runs found

This commit is contained in:
Henry Mercer
2025-09-22 16:08:45 +02:00
parent 6b6d1ddcf9
commit 8a9ef89a8a

View File

@@ -33,6 +33,12 @@ CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs -
echo "$CHECKS" | jq
# Fail if there are no checks
if [ -z "$CHECKS" ] || [ "$CHECKS" == "[]" ]; then
echo "No checks found for $GITHUB_SHA"
exit 1
fi
echo "{\"contexts\": ${CHECKS}}" > checks.json
echo "Updating main"