Skip to content

Commit 95d84f9

Browse files
committed
Fix release gate check lookup
1 parent 855b909 commit 95d84f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/actions/verify-release-gate/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ runs:
2626
STATUS=""
2727
CONCLUSION=""
2828
while [ "$(date +%s)" -lt "$DEADLINE" ]; do
29-
read -r STATUS CONCLUSION <<<"$(gh api "repos/${GITHUB_REPOSITORY}/commits/$SHA/check-runs" \
30-
--jq "[.check_runs[] | select(.name == env.CHECK_NAME)] | sort_by(.started_at) | last | \"\\(.status // \"missing\") \\(.conclusion // \"null\")\"")"
29+
read -r STATUS CONCLUSION <<<"$(gh api --paginate "repos/${GITHUB_REPOSITORY}/commits/$SHA/check-runs" \
30+
| jq -sr --arg check_name "$CHECK_NAME" '[.[].check_runs[] | select(.name == $check_name)] | sort_by(.started_at) | last | if . == null then "missing null" else "\(.status // "missing") \(.conclusion // "null")" end')"
3131
echo "${CHECK_NAME} check-run: status=${STATUS} conclusion=${CONCLUSION}"
3232
if [ "$STATUS" = "completed" ]; then
3333
break

0 commit comments

Comments
 (0)