Misleading guidance on workflow filters #32291
Labels
actions
This issue or pull request should be reviewed by the docs actions team
content
This issue or pull request belongs to the Docs Content team
needs SME
This proposal needs review from a subject matter expert
waiting for review
Issue/PR is waiting for a writer's review
Code of Conduct
What article on docs.github.com is affected?
Using Filters
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:
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:
I expect that the above should only trigger on a push to the
main
branch that alters files undersrc
. However, it actually triggers on BOTH any push tomain
and any push to another branch that changessrc
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
The text was updated successfully, but these errors were encountered: