diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index 79384daa6b3e9..abf9b7c33704e 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -171,11 +171,11 @@ jobs: run: | # Get the latest eval.yml workflow run for the PR's target commit if ! run=$(gh api --method GET /repos/"$REPOSITORY"/actions/workflows/eval.yml/runs \ - -f head_sha="$BASE_SHA" -f event=push \ + -f head_sha="$TARGET_SHA" -f event=push \ --jq '.workflow_runs | sort_by(.run_started_at) | .[-1]') \ || [[ -z "$run" ]]; then - echo "Could not find an eval.yml workflow run for $BASE_SHA, cannot make comparison" - exit 0 + echo "Could not find an eval.yml workflow run for $TARGET_SHA, cannot make comparison" + exit 1 fi echo "Comparing against $(jq .html_url <<< "$run")" runId=$(jq .id <<< "$run") @@ -189,13 +189,13 @@ jobs: if [[ "$conclusion" != "success" ]]; then echo "Workflow was not successful (conclusion: $conclusion), cannot make comparison" - exit 0 + exit 1 fi echo "targetRunId=$runId" >> "$GITHUB_OUTPUT" env: REPOSITORY: ${{ github.repository }} - BASE_SHA: ${{ needs.attrs.outputs.targetSha }} + TARGET_SHA: ${{ needs.attrs.outputs.targetSha }} GH_TOKEN: ${{ github.token }} - uses: actions/download-artifact@v4