Checkout correct PR repo when run with label

This commit is contained in:
Ammar Askar 2023-02-02 19:29:24 -05:00 committed by GitHub
parent 4272d64a54
commit 9b3b474ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,15 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request_target' || contains(github.event.pull_request.labels.*.name, 'safe to test')
steps:
- uses: actions/checkout@v2
- name: Checkout repository
if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v2
- name: Checkout repository (Pull Request Target)
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- uses: actions/cache@v2
with:
path: ./Library