git: Fix CI by removing wrongly commited FETCH_HEAD (#44309)

This is somehow introduced in #43617. This is causing CI failure.
For whatever reason, this thing should only be in `.git` folder. But
somehow it is at the root?

Also changed `.yml` to avoid ambiguity: we are using revision instead of
path.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye
2026-04-17 23:23:39 +08:00
committed by GitHub
parent 789974975f
commit 467fdb1dc0
3 changed files with 6 additions and 2 deletions

View File

@@ -109,9 +109,11 @@ jobs:
- if: ${{ runner.environment == '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.
# Safeguard: -- means FETCH_HEAD is revision instead of path.
# See <https://github.com/servo/servo/pull/44309>
run: |
git switch --detach
git reset --hard FETCH_HEAD
git reset --hard FETCH_HEAD --
- if: runner.environment != 'self-hosted'
name: Setup Python

View File

@@ -182,9 +182,11 @@ jobs:
run: git fetch --depth=1 origin $GITHUB_SHA
- if: ${{ github.event_name == 'pull_request_target' }}
run: git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
# Safeguard: -- means FETCH_HEAD is revision instead of path.
# See <https://github.com/servo/servo/pull/44309>
- run: |
git switch --detach
git reset --hard FETCH_HEAD
git reset --hard FETCH_HEAD --
- name: Adding test files to directory
run: cp -r support/hitrace-bencher/* support/openharmony/AppScope/resources/resfile/
- name: Build for aarch64 HarmonyOS

View File