diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d1e0c060..7b08ab6c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + if: ${{ github.event_name == 'push' }} + + - name: Checkout + uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request_target' }} + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" - name: Set up Docker Buildx id: buildx @@ -99,7 +106,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + if: ${{ github.event_name == 'push' }} + + - name: Checkout + uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request_target' }} + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" - name: Run pre-commits run: | @@ -117,7 +131,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + if: ${{ github.event_name == 'push' }} + + - name: Checkout + uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request_target' }} + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" - name: Run pytests run: |