diff --git a/.circleci/config.yml b/.circleci/config.yml index 33388e21a9..598dbdb851 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -228,9 +228,9 @@ jobs: - run: name: Build Docker image openbas/platform command: | - LATEST_VERSION=$(git describe --tags --abbrev=0) + LATEST_SEMANTIC_VERSION=$(git tag --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) TAGS="-t openbas/platform:${CIRCLE_TAG}" - [ "$CIRCLE_TAG" = "$LATEST_VERSION" ] && TAGS="$TAGS -t openbas/platform:latest" + [ "$CIRCLE_TAG" = "$LATEST_SEMANTIC_VERSION" ] && TAGS="$TAGS -t openbas/platform:latest" docker buildx build --progress=plain --platform $BUILDX_PLATFORMS -f Dockerfile_circleci $TAGS --push . no_output_timeout: 30m - slack/notify: