From 4d2a5ae7485573564e971873269eaaf78ef760e2 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 3 Oct 2023 08:14:27 -0400 Subject: [PATCH] fix: 'latest' tagging in build process. Incorrect check assumed image built on main instead of non-prerelease tag --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a95687b8f..c7dc50b9d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -146,10 +146,10 @@ jobs: - run: name: Build and push Docker image command: | - if [ "$CIRCLE_BRANCH" == "main" ]; then - docker buildx build -t $IMAGE_NAME:latest -t $IMAGE_NAME:${CIRCLE_TAG/v/''} --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --push . - else + if [[ "$CIRCLE_TAG" == *"-"* ]]; then docker buildx build -t $IMAGE_NAME:${CIRCLE_TAG/v/''} --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --push . + else + docker buildx build -t $IMAGE_NAME:latest -t $IMAGE_NAME:${CIRCLE_TAG/v/''} --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --push . fi workflows: