Skip to content
Discussion options

You must be logged in to vote

We can see that this is still a popular discussion we want to add additional info as to why the github.ref may be empty so we can guide users to the correct documentation.

Following @arafajs reply It's important to note that the behavior of github.ref_name depends on the event that triggers the workflow. For instance:

  • For push events, github.ref_name corresponds to the branch or tag that was pushed.
  • For release events, the release tag can be accessed via github.event.release.tag_name, while github.ref_name might not always provide the expected value.
  • For other triggers like pull_request, the variable behaves differently, often pointing to the merge branch or base branch.

We recommend re…

Replies: 7 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@brunocalza
Comment options

@mike-carey
Comment options

Comment options

You must be logged in to vote
1 reply
@jpw1991
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@panserbjorn
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ddebrunner
Comment options

Answer selected by jricciardi
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
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage
9 participants