fix: 'latest' tagging in build process. Incorrect check assumed image built on main instead of non-prerelease tag

This commit is contained in:
Tom Moor
2023-10-03 08:14:27 -04:00
parent 56cae8a545
commit 4d2a5ae748

View File

@@ -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: