name: Console
on:
push:
paths:
- "services/console/**"
- ".github/workflows/console.yaml"
pull_request:
paths:
- "services/console/**"
- ".github/workflows/console.yaml"
We have the above in the following file: .github/workflows/console.yaml. We have other files in the source code, an example would be in services/example-service/**.
The problem I'm trying to fix or understand is the above workflow is triggered when files in the services/example-service are changed and pushed or is in a pull request. This shouldn't happen because that directory is not stated in the on push paths or on pull_request paths.
Here is the documentation for this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths
Is there some scenario I've not thought of regarding this or would this be considered a bug?
The only thing I can see that it might be is this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#git-diff-comparisons
Note: If you push more than 1,000 commits, or if GitHub does not generate the diff due to a timeout, the workflow will always run.
Our code has thousands of commits, but we do not push thousands of new commits when updating.