dorny / paths-filter

Conditionally run actions based on files modified by PR, feature branch or pushed commits
MIT License
2.14k stars 239 forks source link

remote: Repository not found #243

Open razb-viola opened 3 months ago

razb-viola commented 3 months ago

I get this error:

remote: Repository not found.
  Error: fatal: repository 'https://github.com/REPO/' not found
  The process '/usr/bin/git' failed with exit code 128
  Waiting 14 seconds before trying again

And this is the workflow yaml:

- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
        id: filter
        with:
          filters: |
            auth:
              - 'backend/auth/src/**'

and the step of dorny gets the error mentioned above - without reaching to the step of running the service later in the yaml, that's why I didn't provide it here.

I tried both checkout@v4 and v3. I gave permissions of pull request read, as follow:

permissions:
      pull-requests: read
1um commented 2 months ago

It seems the permissions field overrides already granted permissions; here is the fix:

permissions:
      contents: read
      pull-requests: read
alexanderjophus commented 2 months ago

Thanks for this GHA, it's amazing. I'm still getting the issue when I try your fix above. I assume what you're saying is if we don't have the permissions field at all then it just inherits whatever is in the over arching github repo settings?

nvm, I'm an idiot and hit a slightly different problem, solved here: https://github.com/dorny/paths-filter/issues/212#issuecomment-1960976719