diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c1e54741..9a2e1a45 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -23,8 +23,12 @@ jobs: language: [ java ] steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + if: github.event_name == 'push' + - uses: actions/checkout@v4 + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" + if: github.event_name == 'pull_request_target' - name: Setup Java uses: actions/setup-java@v4 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a163c9bb..032e883d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -14,6 +14,11 @@ jobs: steps: - uses: actions/checkout@v4 + if: github.event_name == 'push' + - uses: actions/checkout@v4 + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" + if: github.event_name == 'pull_request_target' - name: Set up JDK 21 uses: actions/setup-java@v4 with: diff --git a/.github/workflows/quality-monitor.yml b/.github/workflows/quality-monitor.yml index 0c887a6e..12c12cba 100644 --- a/.github/workflows/quality-monitor.yml +++ b/.github/workflows/quality-monitor.yml @@ -10,9 +10,12 @@ jobs: name: Build, test and monitor quality on Ubuntu steps: + - uses: actions/checkout@v4 + if: github.event_name == 'push' - uses: actions/checkout@v4 with: - ref: "refs/pull/${{ github.event.number }}/merge" + ref: "${{ github.event.pull_request.merge_commit_sha }}" + if: github.event_name == 'pull_request_target' - name: Set up JDK 21 uses: actions/setup-java@v4 with: