Comments (5)
Hello,
It should work this way: BigFolder/!(InsideFolder/**)/**
This will match everything inside BigFolder except all files under InsideFolder folder.
Please confirm if it works for you by closing this issue. Staring the repo will be also appreciated :)
P.S.: You can't use {ignore: InsideFolder}
- this would have to be added to second argument when this action invokes the picomatch(glob, options)
. Using this action whatever you write inside filter will be used as the first glob argument.
from paths-filter.
Thank you for fast answer.
Great, this solved one part of my problem, the second part is: what I need to do if I want to ignore couple folders inside big folder?
Am I need to create one more filter? Or it function can take multiple arguments?
Another solution here is create a couple filters with different ignoring folders, and use OR argument in IF statement.
from paths-filter.
If you want to ignore multiple folders inside the BigFolder
you can use this:
BigFolder/!((InsideFolder|IgnoreThisToo)/**)/**
This will match everything inside BigFolder except files under InsideFolder and IgnoreThisToo folders.
If there would be too many folders to ignore it could be easier to switch to "whitelist" and explicitly lists folders you are interested in.
If you are not sure how the matching will behave I would suggest you to clone this repo and look into __tests__/filter.test.ts
. It's quite easy to modify and run tests to see what would happen in some specific case. That's actually exactly what I did now.
from paths-filter.
Yes, this solve all my problems, thank you very much for your help, happy new year!
from paths-filter.
Hi ,
I need help in ignoring the file , which is not actual ignore . I have two different work flows like metioned below structure ,
work_flow_A
src (with in work_flow_A. "dir")
file-1
flie-2
file -3
package.json (with in src dir)
src (top level dir)
file-1
file-2
package.json (top level dir)
jobs:
changes_detection:
runs-on:
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
run_work_flow_A:
- 'work_flow_A/**'
- '!src/**'
- '!package.json'
run_work_flow_b:
- '!work_flow_A/**'
the work flow A should true when there is change in workflowA dir and it shoudl ignore if there is change in top level sc dir and in top level package.json file .
The workflow B should true when there is change in entire foler structure except the work_flow_A.
could you please help me in setting up these filters
from paths-filter.
Related Issues (20)
- Import filters file from another repository HOT 1
- Bug: Filter Action reading files from wrong PR HOT 2
- Feature request: Only perform a checkout when it is required for paths-filter to operate.
- [Feature request] Return as changed array HOT 1
- Exclude few folders in one filter HOT 3
- Detecting changes against main branch on main branch merge? HOT 2
- Become 'Verified creator' on GitHub Marketplace HOT 3
- Token clarification
- Override option to set all Filters to true HOT 2
- Changed files with git commands detects too many files
- Is it possible to check if a single folder has changed? HOT 2
- filter in folder changes does not seem to work HOT 1
- Error: Unable to locate executable file: git HOT 4
- Scheduled build always running even if no change in filter path HOT 4
- Node.js 16 actions are deprecated HOT 7
- Update major version tags to point to latest minor version commit when released HOT 2
- How to add individual files to this filter? HOT 1
- Create v3 short tag pointing at the latest v3 release HOT 1
- Working directory does not provide changes paths relative to it. HOT 1
- VSCode "Context Access might be invalid" warning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paths-filter.