From e4bcf9bd239f998951e1e54d536444aa1c4b65e5 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Wed, 3 May 2023 11:27:36 +0700 Subject: [PATCH] Fixes to docker build tagging --- .github/workflows/build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e22599..8846169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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