I'm setting up Gitlab CI job. I want to get the name of the current branch from a Gitlab CI job. How can I do this?
In GitLab 9.0 and above, you have a predefined CI_COMMIT_REF_NAME environment variable you can use in your jobs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With