ci: Use commit ref slug instead of branch name

as default container tag name for uploading, because branch names can
includes characters that aren't valid for tags (such as '/').

Signed-off-by: Andreas Hartmann <hartan@7x.de>
This commit is contained in:
Andreas Hartmann
2023-10-31 07:52:30 +00:00
parent fad19dd8f2
commit e8d882cc13

View File

@@ -36,7 +36,7 @@ build:
script: script:
# N/B: There could be more than one merge-request open with this branch's HEAD # N/B: There could be more than one merge-request open with this branch's HEAD
- | - |
IMAGE_TAG="${CI_COMMIT_BRANCH}"; IMAGE_TAG="${CI_COMMIT_REF_SLUG}";
if [[ -n "$CI_COMMIT_TAG" ]]; then if [[ -n "$CI_COMMIT_TAG" ]]; then
IMAGE_TAG="${CI_COMMIT_TAG}"; IMAGE_TAG="${CI_COMMIT_TAG}";
elif [[ -n "$CI_OPEN_MERGE_REQUESTS" ]]; then elif [[ -n "$CI_OPEN_MERGE_REQUESTS" ]]; then