Skip to content

Commit 8a9ef89

Browse files
committed
Update required checks: Fail if no check runs found
1 parent 6b6d1dd commit 8a9ef89

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/script/update-required-checks.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs -
3333

3434
echo "$CHECKS" | jq
3535

36+
# Fail if there are no checks
37+
if [ -z "$CHECKS" ] || [ "$CHECKS" == "[]" ]; then
38+
echo "No checks found for $GITHUB_SHA"
39+
exit 1
40+
fi
41+
3642
echo "{\"contexts\": ${CHECKS}}" > checks.json
3743

3844
echo "Updating main"

0 commit comments

Comments
 (0)