I’m creating docker image in my CI/CD. I’m currently using $CI_COMMIT_REF_SLUG but I’d like to use CI_COMMIT_TAG is it exists and only revert to $CI_COMMIT_REF_SLUG if it does not.
What’s a simple way to accomplish this? I have not seen a way to conditionally set a variable on the variable section.
In the meanwhile I also realized that CI_COMMIT_REF_SLUG already has the tag instead of the branch if a tag exists… (though with a “-” where a “.” would be preferred, but that’s easy to fix)