workflows/eval: Make sure to compare against the push run (#360274)

This commit is contained in:
Pol Dellaiera 2024-11-30 09:19:42 +01:00 committed by GitHub
commit 46fba61472
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,7 +168,7 @@ jobs:
run: | run: |
# Get the latest eval.yml workflow run for the PR's base commit # Get the latest eval.yml workflow run for the PR's base commit
if ! run=$(gh api --method GET /repos/"$REPOSITORY"/actions/workflows/eval.yml/runs \ if ! run=$(gh api --method GET /repos/"$REPOSITORY"/actions/workflows/eval.yml/runs \
-f head_sha="$BASE_SHA" \ -f head_sha="$BASE_SHA" -f event=push \
--jq '.workflow_runs | sort_by(.run_started_at) | .[-1]') \ --jq '.workflow_runs | sort_by(.run_started_at) | .[-1]') \
|| [[ -z "$run" ]]; then || [[ -z "$run" ]]; then
echo "Could not find an eval.yml workflow run for $BASE_SHA, cannot make comparison" echo "Could not find an eval.yml workflow run for $BASE_SHA, cannot make comparison"