Skip to content

Commit c01511e

Browse files
Fix path filtering: fetch-depth 2 for git diff HEAD~1
Shallow clones (fetch-depth: 1, the default) don't have a parent commit, so git diff HEAD~1 HEAD fails silently and falls back to building all projects. Adding fetch-depth: 2 to the changes job checkout ensures the parent commit is available for the diff.
1 parent f8fb273 commit c01511e

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/anchor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
matrix: ${{ steps.matrix.outputs.matrix }}
3232
steps:
3333
- uses: actions/checkout@v5
34+
with:
35+
fetch-depth: 2
3436
- uses: dorny/paths-filter@v4
3537
id: changes
3638
if: github.event_name == 'pull_request'

.github/workflows/native.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
matrix: ${{ steps.matrix.outputs.matrix }}
3232
steps:
3333
- uses: actions/checkout@v5
34+
with:
35+
fetch-depth: 2
3436
- uses: dorny/paths-filter@v4
3537
id: changes
3638
if: github.event_name == 'pull_request'

.github/workflows/pinocchio.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
matrix: ${{ steps.matrix.outputs.matrix }}
3232
steps:
3333
- uses: actions/checkout@v5
34+
with:
35+
fetch-depth: 2
3436
- uses: dorny/paths-filter@v4
3537
id: changes
3638
if: github.event_name == 'pull_request'

.github/workflows/quasar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
matrix: ${{ steps.matrix.outputs.matrix }}
3434
steps:
3535
- uses: actions/checkout@v5
36+
with:
37+
fetch-depth: 2
3638
- uses: dorny/paths-filter@v4
3739
id: changes
3840
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)