i have a gitlab ci config like this
simple build :
stage: build
script:
# i want to echo branch name here
rules :
- if: $CI_COMMIT_TAG
i want to echo branch name as a variable
i tried to use $CI_COMMIT_BRANCH or $CI_COMMIT_REF_NAME but both of these variable only works when the pipeline is triggered by a commit
New contributor
eby64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.