[ci,abi] only check out pull request on trigger

This commit is contained in:
akallabeth 2024-02-27 08:33:01 +01:00 committed by akallabeth
parent c61fc2a0fa
commit 6b5ed8e36a

View File

@ -15,9 +15,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Run ABI checker on ubuntu-latest" name: "Run ABI checker on ubuntu-latest"
steps: steps:
- uses: suzuki-shunsuke/get-pr-action@v0.1.0 - name: "Check out pull request"
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'pull_request_target' }}
uses: suzuki-shunsuke/get-pr-action@v0.1.0
id: pr id: pr
- uses: actions/checkout@v4
- name: "Check out source"
uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{steps.pr.outputs.merge_commit_sha}} ref: ${{steps.pr.outputs.merge_commit_sha}}