From 504199e4834110f2daf326ea1d7bed0ebbe966db Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Tue, 13 Feb 2024 11:13:44 -0500 Subject: [PATCH] pull request target does not refer to the PR head --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea2a4d5dfe..bb5c534a66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,14 @@ jobs: test: runs-on: scilus-runners steps: - - name: Checkout repository + - name: Checkout repository for PR + if: github.event.pull_request.number + uses: actions/checkout@v4.1.1 + with: + ref: refs/pull/${{ github.event.pull_request.number }}/merge + + - name: Checkout repository for merge + if: ! github.event.pull_request.number uses: actions/checkout@v4.1.1 - name: Fetch python version from repository