From 02b271a78d476e44068e33c36f1bd9319baeded1 Mon Sep 17 00:00:00 2001 From: Pratik <68642400+pratikbalar@users.noreply.github.com> Date: Sun, 20 Jun 2021 14:06:26 +0530 Subject: [PATCH] Consistancy in docker image tag Stay consistent with docker image tag as per release version for good practice and standardization. --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e8d2823..ab224e01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,13 +58,12 @@ jobs: - name: Build and push image run: | - IMAGE_V_VERSION="$(git describe --tags --abbrev=0)" - IMAGE_VERSION=${IMAGE_V_VERSION:1} + IMAGE_VERSION="$(git describe --tags --abbrev=0)" SHORT_SHA1=$(git rev-parse --short HEAD) PLATFORMS="linux/amd64,linux/ppc64le,linux/arm64" echo "Building and pushing version ${IMAGE_VERSION} of image ${IMAGE_NAME}" echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - docker buildx build --platform "${PLATFORMS}" -t "${IMAGE_NAME}:${IMAGE_VERSION}" -t "${IMAGE_NAME}:latest" -t "${IMAGE_NAME}:4" \ + docker buildx build --platform "${PLATFORMS}" -t "${IMAGE_NAME}:v${IMAGE_VERSION}" -t "${IMAGE_NAME}:latest" -t "${IMAGE_NAME}:4" \ --push .