In the GitHub actions 'Events that trigger workflows' documentation there are multiple ways listed, like on specific branches and specific path changes. Is there a way to combine those two using an AND?
As far as I understand the following syntax would trigger the run if the push is either to the master branch OR to the specific path. Is it possible to say that both criteria must be fulfilled to trigger the action?
on:
push:
branches:
- master
paths:
- 'app/*'
Note: I am not looking for a hacky solution like letting it trigger on the path and then checking in the step if the branch is the master branch. I know that this is possible, but you would need to do it for each step and it isn't elegant at all.
Your specific request does not appear to be supported by the syntax.
I read through the workflow syntax for GitHub Actions documentation and the two trigger configurations appear unrelated.