diff options
author | Delan Azabani <dazabani@igalia.com> | 2024-09-09 12:43:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 04:43:25 +0000 |
commit | 9cfbaf92e5bc80dca90f1226dbc4cdcfe025eeb3 (patch) | |
tree | 9839e67f3eb8c699ee88a476a3b8af4554081d18 /.github/workflows | |
parent | 4d0bef0ac3d31a7ea5933b2fa8bc2118d0452ea9 (diff) | |
download | servo-9cfbaf92e5bc80dca90f1226dbc4cdcfe025eeb3.tar.gz servo-9cfbaf92e5bc80dca90f1226dbc4cdcfe025eeb3.zip |
CI: fix self-hosted runners in try-label builds (#33373)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/linux.yml | 2 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ae7548e3112..3eabd978768 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -108,7 +108,7 @@ jobs: - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) && github.event_name != 'pull_request_target' }} run: git fetch --depth=1 origin $env:GITHUB_SHA - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) && github.event_name == 'pull_request_target' }} - run: git fetch --depth=1 origin refs/pull/${{ github.event_number }}/head + run: git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }} - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }} # Same as `git switch --detach FETCH_HEAD`, but fixes up dirty working # trees, in case the runner image was baked with a dirty working tree. diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e2d706d514f..d4b6698eb56 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -81,7 +81,7 @@ jobs: - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) && github.event_name != 'pull_request_target' }} run: git fetch --depth=1 origin $env:GITHUB_SHA - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) && github.event_name == 'pull_request_target' }} - run: git fetch --depth=1 origin refs/pull/${{ github.event_number }}/head + run: git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }} - if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }} # Same as `git switch --detach FETCH_HEAD`, but fixes up dirty working # trees, in case the runner image was baked with a dirty working tree. |