-
Notifications
You must be signed in to change notification settings - Fork 64.5k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
I didn't submit this as a PR because I don't know if the mistake is in Docs or in GitHub Actions.
In the docs, it states:
If you define both branches/branches-ignore and paths/paths-ignore, the workflow will only run when both filters are satisfied.
However, this is not true. Both in my own experience writing Actions for my company and in StackOverflow threads, it's clear that GitHub uses a logical OR instead of the implied AND from above. E.g., if I specify in a workflow:
on:
push:
branches:
- main
paths:
- "src/**"I expect that the above should only trigger on a push to the main branch that alters files under src. However, it actually triggers on BOTH any push to main and any push to another branch that changes src files.
If this is the desired behavior, then the docs should be changed to reflect it. If it's not the desired behavior, then Actions should be changed to reflect the docs
Additional information
No response