Skip to content

Get branch name #25363

Answered by Yanjingzhu
reikdas asked this question in Actions
Discussion options

You must be logged in to vote
reikdas:

Do I need to create separate steps for a pull request and a push?

My answer is yes. As the two events push and pull_request have different event payload , I would recommend you add two steps to get PR branch and push commit branch. You could add if conditional to these two steps:

if: github.event_name == 'pull_request'

and

if: github.event_name == 'push'

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants