Skip to content

Commit 8b34e6d

Browse files
committed
Updated command to pass only after at least 1 job passed
1 parent 97d29b1 commit 8b34e6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/pr-supervisor.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@ jobs:
4242
pending=$(echo "$checks" | jq '[.[] | select(.state == "pending")] | length')
4343
skipping=$(echo "$checks" | jq '[.[] | select(.state == "skipping")] | length')
4444
failed=$(echo "$checks" | jq '[.[] | select(.state == "fail")] | length')
45+
passed=$(echo "$checks" | jq '[.[] | select(.state == "pass")] | length')
46+
47+
echo "Pending checks: $pending, Skipping checks: $skipping", Passed checks: $passed, Failed checks: $failed
4548
4649
if [[ "$failed" -gt 0 ]]; then
4750
echo "A check has failed! Failing fast."
4851
exit 1
4952
fi
5053
51-
echo "Pending checks: $pending, Skipping checks: $skipping"
52-
53-
if [[ "$pending" -eq 0 ]]; then
54+
if [[ "$pending" -eq 0 ]] && [[ "$passed" -gt 0 ]]; then
5455
echo "All non-supervisor checks are completed!"
5556
exit 0
5657
fi

0 commit comments

Comments
 (0)