Skip to content

Commit f665706

Browse files
committed
adding content
1 parent 2978187 commit f665706

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

03-core-features/filters/included-file.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,26 @@ on:
1212
paths:
1313
- 'filters/**.md'
1414
```
15+
16+
## How Path Filters Work
17+
18+
GitHub Actions supports two path filter keys:
19+
20+
- **`paths`** — triggers the workflow when a matching file is changed.
21+
- **`paths-ignore`** — skips the workflow when only matching files are changed.
22+
23+
You can also use negation patterns to fine-tune behavior:
24+
25+
```yaml
26+
on:
27+
push:
28+
paths:
29+
- '**.md'
30+
- '!**/excluded-file.txt'
31+
```
32+
33+
## Notes
34+
35+
- Glob patterns follow the same syntax as `.gitignore`.
36+
- At least one changed file must match for the workflow to trigger.
37+
- `paths` and `paths-ignore` cannot be used together in the same event trigger.

0 commit comments

Comments
 (0)