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

.github/workflows/** always evaluates as true #146

Open
aubelsb2 opened this issue Aug 4, 2022 · 2 comments
Open

.github/workflows/** always evaluates as true #146

aubelsb2 opened this issue Aug 4, 2022 · 2 comments

Comments

@aubelsb2
Copy link

aubelsb2 commented Aug 4, 2022

      - uses: dorny/paths-filter@v2
        id: changes
        with:
          filters: |
            src:
              - 'src/**'
              - '*.json'
              - '*.js'
              - .github/workflows/**

Always evaluates as true log shows that it indicates that every workflow has been modified.

@jcadavez
Copy link

Similar issue here. I didn't include .github/workflows/** in my filter so that any change to those files would be filtered out.

    - name: Check for changes files in Story Editor Frontend repo
      uses: dorny/paths-filter@v3
      id: filter
      with:
        token: ${{ secrets.GITHUBACTIONSTOKEN }}
        filters: |
          both:
            - 'public/**'
            - 'server/**'
            - 'src/**'
            - '!src/**/*.test.ts'
            - '!src/**/*.cy.ts'
            - 'Dockerfile'
            - 'vite.config.ts'
            - 'package.json'
            - 'package-lock.json'
          component:
            - 'src/**/*.test.ts'
            - 'src/**/*.cy.ts'
          e2e:
            - '__testsPlaywright__/**'

Yet, when I ran a pull request, it states that the both filter is flagged true because there's changes in `.github/workflows/**.
image

@jcadavez
Copy link

Similar issue here. I didn't include .github/workflows/** in my filter so that any change to those files would be filtered out.

    - name: Check for changes files in Story Editor Frontend repo
      uses: dorny/paths-filter@v3
      id: filter
      with:
        token: ${{ secrets.GITHUBACTIONSTOKEN }}
        filters: |
          both:
            - 'public/**'
            - 'server/**'
            - 'src/**'
            - '!src/**/*.test.ts'
            - '!src/**/*.cy.ts'
            - 'Dockerfile'
            - 'vite.config.ts'
            - 'package.json'
            - 'package-lock.json'
          component:
            - 'src/**/*.test.ts'
            - 'src/**/*.cy.ts'
          e2e:
            - '__testsPlaywright__/**'

Yet, when I ran a pull request, it states that the both filter is flagged true because there's changes in `.github/workflows/**. image

Scratch that, issue was because of how picomatch pattern matches files. Specifically this pattern makes it detect any change but to the tests

            - '!src/**/*.test.ts'
            - '!src/**/*.cy.ts'

Had to use predicate-quantifier: 'every' to fix that issue. Note, it does have a linting error.
#226

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

2 participants