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
) ?
CodePudding user response:
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.