From 0518d6108d0f6fb607e0b99b5905c247545986a7 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 3 Mar 2021 12:24:42 -0600 Subject: [PATCH] fix: strip "refs/tags/" prefix from GITHUB_REF when generating container tags Signed-off-by: Matthew Weier O'Phinney --- .github/workflows/build-and-push-containers.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-push-containers.yml b/.github/workflows/build-and-push-containers.yml index 5ba35741..8a30365e 100644 --- a/.github/workflows/build-and-push-containers.yml +++ b/.github/workflows/build-and-push-containers.yml @@ -13,10 +13,11 @@ jobs: - name: Compile tag list id: tags run: | + TAG=${GITHUB_REF/refs\/tags\//} PREFIX=ghrc.io/laminas/automatic-releases - MAJOR="${PREFIX}:$(echo ${GITHUB_REF} | cut -d. -f1)" - MINOR="${MAJOR}.$(echo ${GITHUB_REF} | cut -d. -f2)" - PATCH="${PREFIX}:${GITHUB_REF}" + MAJOR="${PREFIX}:$(echo ${TAG} | cut -d. -f1)" + MINOR="${MAJOR}.$(echo ${TAG} | cut -d. -f2)" + PATCH="${PREFIX}:${TAG}" echo "::set-output name=tags::${MAJOR}%0A${MINOR}%0A${PATCH}" release-container: