mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03: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.
This commit is contained in:
parent
72200554df
commit
cd9a22d753
1 changed files with 1 additions and 1 deletions
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue