CI: fix self-hosted runners in try-label builds (#33373)

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2024-09-09 12:43:25 +08:00 committed by GitHub
parent 4d0bef0ac3
commit 9cfbaf92e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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.