From 8af8839d73c622e0e8d933a8136ba8d523bb76e7 Mon Sep 17 00:00:00 2001
From: DanEric <dan@syncad.com>
Date: Mon, 16 Dec 2024 17:04:57 +0000
Subject: [PATCH] Push the postgrest-rewriter to registry.hive.blog for tagged
 releases

---
 .gitlab-ci.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a7b0f22..552772e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -396,7 +396,12 @@ build_and_publish_image:
   before_script:
     - !reference [.publish_docker_image_template, before_script]
   script:
-    - scripts/ci-helpers/build_and_publish_instance.sh
+    - |
+      scripts/ci-helpers/build_and_publish_instance.sh
+      if [[ -n "$CI_COMMIT_TAG" ]]; then
+        docker tag "$CI_REGISTRY_IMAGE/postgrest-rewriter:$CI_COMMIT_TAG" "registry-upload.hive.blog/balance_tracker/postgrest-rewriter:$CI_COMMIT_TAG"
+        docker push "registry-upload.hive.blog/balance_tracker/postgrest-rewriter:$CI_COMMIT_TAG"
+      fi
   tags:
     - public-runner-docker
     - hived-for-tests
-- 
GitLab