GitHub Action on Pull Request only for certain branches #26795
-
I’m using Actions to set up Heroku+Vercel review apps for pull requests. I also use Git Flow, so release candidates and hot fixes are made as pull requests and get deployed to staging. I don’t want my actions related to review apps to run for RCs and hot fixes. I’ve added a couple rules to the workflow YAML configs:
It does not seem that the
The docs that refer to the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The branch filter for
|
Beta Was this translation helpful? Give feedback.
The branch filter for
pull_request
events works based on the name of the target (“base”) branch, not the branch holding the changes you want to merge in. So those filters you’ve tried will skip the workflow if the PR is trying to merge into an RC or hotfix branch. See documentation onon.<push|pull_request>.<branches|tags>
: