Reputation: 19312
I have the following trigger
on:
pull_request:
types:
- opened
branches:
- 'foobranch'
issue_comment:
types:
- created
When opening a PR targeting foobranch
, the workflow does not run.
Is it because the workflow file does not exist on any other branch than the default? (master
) ?
Upvotes: 0
Views: 3583
Reputation: 89
Yes, GitHub uses the sources of the associated pull request so you most likely need to rebase the branch or cherry-pick the workflow to your pull request branch.
GitHub documentation here:
GitHub searches the .github/workflows directory in your repository for workflow files that are present in the associated commit SHA or Git ref of the event.
Upvotes: 1