-
Notifications
You must be signed in to change notification settings - Fork 63.5k
Closed
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content team
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
GITHUB_REF
and GITHUB_REF_NAME
show example values of refs/heads/feature-branch-1
and feature-branch-1
respectively. However this is inconsistent with the values populated in the case of a PR-triggered workflow.
Given the description and example, one would expect to see the branch that triggered the workflow when running a PR-triggered workflow. Instead these variables are populated by values like refs/pull/26/merge
and 26/merge
respectively. The variable that contains the desired data in this case is actually GITHUB_HEAD_REF
.
The documentation should be updated to more accurately describe the content of GitHub Actions predefined variables.
Additional information
No response
pgbezerra, diohabara, anhdle14, steven-sheehy, kyranjamie and 56 more
Metadata
Metadata
Assignees
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content team