Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter paths #238

Open
dorjanshurdhi opened this issue May 9, 2024 · 0 comments
Open

Filter paths #238

dorjanshurdhi opened this issue May 9, 2024 · 0 comments

Comments

@dorjanshurdhi
Copy link

I'm trying to use this plugin to filter only the directory names of my chnagnged files under the libs directoy.

For example I have those changed files:

Run dorny/paths-filter@v3
Get current git ref
Changes will be detected between main and PA-1000
Searching for merge-base main...PA-1000
Change detection refs/remotes/origin/main...refs/remotes/origin/PA-1000
Detected 4 changed files
Results:
Filter libs = true
  Matching files:
  **libs/auth_utils/src/pdnd_auth_utils/auth_util.py [modified]
  libs/tests/test_mock.py [modified]**
Changes output set to ["libs"]

in this case I want to put on my output only the name oif the subfolders of libs

libs = ["auth_utils", "tests"]

this is my action:

jobs:
  changes:
    runs-on:  ubuntu-22.04
    timeout-minutes: 5

    outputs:
      libs: ${{ steps.filter.outputs.changes.libs }}
      changed: ${{ steps.filter.outputs.changes }}

    steps:

      - name: Checkout
        id: checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Filter changes
        id: filter
        uses: dorny/paths-filter@v3
        with:
          filters: |
            libs:
              - added|modified: 'libs/**'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant