Skip to content

Commit 413d493

Browse files
lwshangclaude
andcommitted
fix(ci): make paths-filter negation patterns actually exclude files
The dorny/paths-filter default predicate-quantifier is 'some' (OR), which means negation patterns like '!**.md' never exclude files already matched by a positive pattern like '**'. Switch to 'every' (AND) so docs-only changes correctly skip CI. Also bump to v4.0.1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e95eeef commit 413d493

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/workflows/checks.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ jobs:
1515
pull-requests: read
1616
steps:
1717
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
18-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
18+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
1919
id: filter
2020
with:
21-
# 'src' is true when any changed file matches a positive pattern
22-
# and does not match a negative pattern (! prefix).
21+
# With 'every', a changed file is matched only when it satisfies
22+
# ALL rules: the positive pattern AND every negated pattern.
23+
predicate-quantifier: 'every'
2324
filters: |
2425
src:
2526
- '**'

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
pull-requests: read
3030
steps:
3131
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
32-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
32+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
3333
id: filter
3434
with:
35-
# 'src' is true when any changed file matches a positive pattern
36-
# and does not match a negative pattern (! prefix).
35+
# With 'every', a changed file is matched only when it satisfies
36+
# ALL rules: the positive pattern AND every negated pattern.
37+
predicate-quantifier: 'every'
3738
filters: |
3839
src:
3940
- '**'

.github/workflows/validate-examples.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
pull-requests: read
2222
steps:
2323
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
24-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
24+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
2525
id: filter
2626
with:
27-
# 'src' is true when any changed file matches a positive pattern
28-
# and does not match a negative pattern (! prefix).
27+
# With 'every', a changed file is matched only when it satisfies
28+
# ALL rules: the positive pattern AND every negated pattern.
29+
predicate-quantifier: 'every'
2930
filters: |
3031
src:
3132
- '**'

0 commit comments

Comments
 (0)