mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
workflows/eval: fix comparison with merge conflicts
In PRs with multiple commits and merge conflicts the logic "targetSha ==
immediate parent of mergedSha" doesn't hold anymore. The head and base
commits of the PR's branch have some commits inbetween them, instead.
Before this change, we'd get a "fatal: invalid reference" on the
"worktree add". Now, not anymore, because we fetch the right commit
directly.
(cherry picked from commit cd9a22d753)
This commit is contained in:
committed by
github-actions[bot]
parent
4916bbfc97
commit
6cddb25b5b
2
.github/workflows/eval.yml
vendored
2
.github/workflows/eval.yml
vendored
@@ -101,7 +101,6 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ needs.prepare.outputs.mergedSha }}
|
||||
fetch-depth: 2
|
||||
path: nixpkgs
|
||||
|
||||
- name: Install Nix
|
||||
@@ -168,6 +167,7 @@ jobs:
|
||||
env:
|
||||
AUTHOR_ID: ${{ github.event.pull_request.user.id }}
|
||||
run: |
|
||||
git -C nixpkgs fetch --depth 1 origin ${{ needs.prepare.outputs.targetSha }}
|
||||
git -C nixpkgs worktree add ../target ${{ needs.prepare.outputs.targetSha }}
|
||||
git -C nixpkgs diff --name-only ${{ needs.prepare.outputs.targetSha }} \
|
||||
| jq --raw-input --slurp 'split("\n")[:-1]' > touched-files.json
|
||||
|
||||
Reference in New Issue
Block a user