paths-filter icon indicating copy to clipboard operation
paths-filter copied to clipboard

How to add individual files to this filter?

Open adykaaa opened this issue 1 year ago • 1 comments

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?

adykaaa avatar Feb 06 '24 07:02 adykaaa

This should work:

- uses: dorny/paths-filter@v3
  id: changes
  with:
    filters: |
      all-files:
        - '!(((.github|.hooks|actions|docs|frontend)/**)|.gitignore|otherDirectory/package.json)'

jamesc-skyward avatar Feb 22 '24 21:02 jamesc-skyward