GitHub
GITHUB-ACTIONS · Question #26
Which default environment variable specifies the branch or tag that triggered a workflow?
The correct answer is B. GITHUB_REF. The GITHUB_REF environment variable specifies the branch or tag that triggered the workflow. It contains the full reference to the branch or tag, such as refs/heads/main for a branch or refs/tags/v1.0 for a tag.
Use workflow components to automate software development lifecycle
Question
Which default environment variable specifies the branch or tag that triggered a workflow?
Options
- AGITHUB_TAG
- BGITHUB_REF
- CENV_BRANCH
- DGITHUB_BRANCH
How the community answered
(33 responses)- A3% (1)
- B91% (30)
- C6% (2)
Explanation
The GITHUB_REF environment variable specifies the branch or tag that triggered the workflow. It contains the full reference to the branch or tag, such as refs/heads/main for a branch or refs/tags/v1.0 for a tag.
Topics
#default environment variables#GITHUB_REF#workflow context#trigger metadata
Community Discussion
No community discussion yet for this question.