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

@ -41,8 +41,16 @@ jobs:
runs-on: macos-12
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: Bootstrap
@ -106,9 +114,17 @@ jobs:
# matrix:
# chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 2
# - 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
# - uses: actions/download-artifact@v3
# with:
# name: release-binary-macos