-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v3.8.5] Fix wrong head commit id in web-interface-check.yml ci scrip…
…t. (#17827)
- Loading branch information
Showing
3 changed files
with
191 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,15 @@ jobs: | |
repository: ${{ github.event.pull_request.base.repo.full_name }} | ||
ref: ${{ github.base_ref }} | ||
path: './engine' | ||
|
||
- name: Get Base Ref | ||
working-directory: ./engine | ||
run: | | ||
echo "BASE_REF=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
- run: | | ||
"EXT_VERSION=$(node ./engine/.github/workflows/get-native-external-version.js)" >> $env:GITHUB_ENV | ||
shell: pwsh | ||
echo "EXT_VERSION=$(node ./engine/.github/workflows/get-native-external-version.js)" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
name: Download external | ||
with: | ||
|
@@ -52,12 +58,38 @@ jobs: | |
- uses: actions/checkout@v4 | ||
name: Checkout Head Ref | ||
with: | ||
ref: 'refs/pull/${{ github.event.pull_request.number }}/merge' # Don't check out the head commit, checkout the "merge commit" instead | ||
ref: 'refs/pull/${{ github.event.pull_request.number }}/head' | ||
path: './engine-HEAD' | ||
fetch-depth: 0 | ||
|
||
- name: Head merges base | ||
working-directory: ./engine-HEAD | ||
run: | | ||
git config user.name "Cocos CI" | ||
git config user.email "[email protected]" | ||
echo "BASE_REF: ${{ env.BASE_REF }}" | ||
HEAD_REF=$(git rev-parse HEAD) | ||
echo "HEAD_REF: $HEAD_REF" | ||
echo "--------------------------------------------------------" | ||
echo "HEAD LOG:" | ||
git --no-pager log -3 | ||
echo "--------------------------------------------------------" | ||
git fetch origin ${{ env.BASE_REF }} | ||
git reset --hard ${{ env.BASE_REF }} | ||
echo "--------------------------------------------------------" | ||
echo "BASE LOG:" | ||
git --no-pager log -3 | ||
echo "--------------------------------------------------------" | ||
CURRENT_REF=$(git rev-parse HEAD) | ||
echo "---- $CURRENT_REF merges $HEAD_REF ----" | ||
git merge $HEAD_REF | ||
echo "--------------------------------------------------------" | ||
echo "MERGED LOG:" | ||
git --no-pager log -5 | ||
echo "--------------------------------------------------------" | ||
- run: | | ||
"EXT_VERSION_HEAD=$(node ./engine-HEAD/.github/workflows/get-native-external-version.js)" >> $env:GITHUB_ENV | ||
shell: pwsh | ||
echo "EXT_VERSION_HEAD=$(node ./engine-HEAD/.github/workflows/get-native-external-version.js)" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
name: Download external | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.