Skip to content

Commit 1482882

Browse files
author
SS-42
committed
fix(ci): query CodeQL runs by head SHA
Signed-off-by: SS-42 <noreply@incogni.to>
1 parent 09148ab commit 1482882

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎.github/workflows/_security.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
CURRENT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
5252
echo "Waiting for CodeQL to complete on $CURRENT_SHA..."
5353
for attempt in $(seq 1 90); do
54-
LATEST=$(gh api repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?per_page=5 \
55-
--jq '.workflow_runs[] | select(.head_sha == "'"$CURRENT_SHA"'") | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
54+
LATEST=$(gh api "repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?head_sha=$CURRENT_SHA&per_page=1" \
55+
--jq '.workflow_runs[] | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
5656
if [ -z "$LATEST" ]; then
5757
echo " $attempt/90: no run yet..."; sleep 30; continue
5858
fi

0 commit comments

Comments
 (0)