Fixes to docker build tagging

This commit is contained in:
QuantumEntangledAndy committed 2023-05-03 11:27:36 +07:00
1 parent 8a0d4a8f03
commit e4bcf9bd23
1 file changed
+8 -3
+8 -3
View File
@@ -204,13 +204,18 @@ jobs:
run: |
tags=""
gittag="$(git tag --points-at HEAD)"
branch="$)git rev-parse --abbrev-ref HEAD)"
branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ -n "${gittag}" ]]; then
tags="${REPO_NAME}:${gittag}"
elif [[ -n "${branch}" ]]; then
fi
if [[ -n "${branch}" ]]; then
branch="$(echo "${branch}" | sed -E 's|[/]|-|g')"
tags="${REPO_NAME}:${branch}"
if [[ -z "${tags}" ]]; then
tags="${REPO_NAME}:${branch}"
else
tags="${tags},${REPO_NAME}:${branch}"
fi
if [ "${branch}" == "master" ]; then
tags="${tags},${REPO_NAME}:latest"
fi