paths-filter
paths-filter copied to clipboard
How to add individual files to this filter?
I am using a filter like so:
all-files:
- "["!((.github|.hooks|actions|docs|frontend)/**)"]"
which works great because these directories are getting ignored (which is what I want). I also want to be able to add invididual files to this exact filter, e.g .gitignore or otherDirectory/package.json. How can I do that?
This should work:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
all-files:
- '!(((.github|.hooks|actions|docs|frontend)/**)|.gitignore|otherDirectory/package.json)'