diff --git a/.github/workflows/linux-wpt.yml b/.github/workflows/linux-wpt.yml index c1336ed2ef0..c729e3075a2 100644 --- a/.github/workflows/linux-wpt.yml +++ b/.github/workflows/linux-wpt.yml @@ -25,8 +25,16 @@ jobs: 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 + 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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 89609ee2307..c625aef5c54 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 98620ff96bc..3581060c5be 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 743fc211e04..07f1a3a2ed3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -39,8 +39,16 @@ jobs: runs-on: windows-2019 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: wix311-binaries shell: powershell run: |