Checkout the PR when triggering try from PR comments (#30069)

Fixes #30067.
This commit is contained in:
Martin Robinson 2023-08-04 09:06:43 +02:00 committed by GitHub
parent 926cce5b86
commit 51fa6c7e18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 3 deletions

View file

@ -55,8 +55,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
if: github.event_name != 'issue_comment'
with:
fetch-depth: 2
# This is necessary to checkout the pull request if this run was triggered
# via an `issue_comment` action on a pull request.
- uses: actions/checkout@v3
if: github.event_name == 'issue_comment'
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 2
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Select Python 3.9