From 16c2efb16eca76e3e05f8987c2c7f9ba1c66c0fa Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Fri, 20 Dec 2024 13:06:19 +0200 Subject: [PATCH] Revert "Just always build latest docker images and let docker hub reject duplicates" This reverts commits: eef1eb189f135a809cdd4f61c28e445e84807aa6 51b03df72c83680ba460819cca7d617018f2cc32 25b079280ae94ae2425cb62ca1af966143b97506 39aa169900d0e161a47ae8ade46c98293977f27a 619d0db118a8ba9b6977453d0d6d8c6c3a25090f 8f8bcb67e27cc96bb2c1299b1079b985360fff02 The current logic is flawed in that it always builds the latest commit from the main branch and replaces the release tag on Docker Hub with it. --- .buildkite/docker-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.buildkite/docker-image.yml b/.buildkite/docker-image.yml index a6a1a239c4..9e8eededf8 100644 --- a/.buildkite/docker-image.yml +++ b/.buildkite/docker-image.yml @@ -20,11 +20,10 @@ steps: . - wait - label: "🚀 Build & publish the release image to Docker Hub" - if: build.branch == "main" + if: build.tag =~ /@core\/sync-service@/ command: - export ELECTRIC_IMAGE_NAME="${DOCKERHUB_REPO}/${IMAGE_NAME}" - cd ./packages/sync-service - - git fetch --tags - export ELECTRIC_VERSION=$(jq '.version' -r package.json) - docker buildx build --platform linux/arm64/v8,linux/amd64 --push --build-arg ELECTRIC_VERSION=$${ELECTRIC_VERSION}