Skip to content

Commit d93400b

Browse files
SecAI-Hubclaude
andcommitted
Fix release preflight: use startswith for matrix job name matching
The preflight checked for exact name "Go Build & Test" but CI produces matrix jobs named "Go Build & Test (registry)", etc. Use jq startswith to match all matrix variants and require all to be success. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e964897 commit d93400b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ jobs:
4949
PASS=0
5050
FAIL=0
5151
for check in "${REQUIRED_CHECKS[@]}"; do
52+
# Use startswith to handle matrix jobs (e.g. "Go Build & Test (registry)")
5253
RESULT=$(gh api "repos/${{ github.repository }}/commits/${SHA}/check-runs" \
53-
--jq ".check_runs[] | select(.name == \"${check}\") | .conclusion" \
54-
2>/dev/null | head -1 || echo "not_found")
54+
--jq "[.check_runs[] | select(.name | startswith(\"${check}\")) | .conclusion] | if length == 0 then [\"not_found\"] else . end | if all(. == \"success\") then \"success\" else .[0] end" \
55+
2>/dev/null || echo "not_found")
5556
if [ "$RESULT" = "success" ]; then
5657
echo "OK: ${check} = ${RESULT}"
5758
PASS=$((PASS + 1))

0 commit comments

Comments
 (0)