diff options
-rw-r--r-- | .github/workflows/build.yml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cef01ede78..09a170d7fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,12 @@ jobs: java: [21] fail-fast: true steps: - - uses: actions/checkout@v4 + - if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v4 + - if: ${{ github.event_name == 'pull_request' }} + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: |