Skip to content

Getting the source branch on a pull_request event and the pushed branch on a push event #30794

Answered by elongl
elongl asked this question in Actions
Discussion options

You must be logged in to vote

I ended up using BRANCH_NAME: ${{ github.head_ref || github.ref_name }} but I'm not sure if this is the best way, works for now.

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@alexjanckilagc
Comment options

@krebemm
Comment options

@aghand0ur
Comment options

@McBlankenburg
Comment options

Answer selected by elongl
Comment options

You must be logged in to vote
0 replies
Comment options

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