From 7ce94dc3a59236c41e96637415c0e238c9c147ed Mon Sep 17 00:00:00 2001 From: Luca Grillotti Date: Tue, 28 Nov 2023 21:42:26 +0900 Subject: [PATCH] update ci --- .github/workflows/ci.yaml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) 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: |