GithubHelp home page GithubHelp logo

Comments (5)

dorny avatar dorny commented on May 22, 2024

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.

avolusb avatar avolusb commented on May 22, 2024

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.

dorny avatar dorny commented on May 22, 2024

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.

avolusb avatar avolusb commented on May 22, 2024

Yes, this solve all my problems, thank you very much for your help, happy new year!

from paths-filter.

jawahar-integrate avatar jawahar-integrate commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.