]> OCCT Git - occt.git/commitdiff
Testing - Target branch to compare validation of repo (#524)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Thu, 15 May 2025 09:43:52 +0000 (10:43 +0100)
committerGitHub <noreply@github.com>
Thu, 15 May 2025 09:43:52 +0000 (10:43 +0100)
Ensure latest workflow run ID is fetched from the correct repository in test summary action

.github/actions/test-summary/action.yml

index a582a47b52ddcaecb476c38340746d0c87f5ae3f..a6fbb8546b28d469202cde304599a24fe987bf83 100644 (file)
@@ -33,7 +33,9 @@ runs:
         response=$(curl -s \
           -H "Accept: application/vnd.github.v3+json" \
           "https://api.github.com/repos/${{ github.repository }}/actions/runs?branch=${{ github.event.pull_request.base.ref }}&status=success")
-        latest_run_id=$(echo "$response" | jq -r '.workflow_runs[] | select(.name=="Build and Test OCCT on Multiple Platforms") | .id' | head -n 1)
+        latest_run_id=$(echo "$response" | jq -r \
+          --arg repo "${{ github.repository }}" \
+          '.workflow_runs[] | select(.name=="Build and Test OCCT on Multiple Platforms" and .head_repository.full_name==$repo) | .id' | head -n 1)
         echo "latest_run_id=$latest_run_id" >> $GITHUB_ENV
       shell: bash