From 703c3e9a902363ae81e905932d7a2a3bb3881cee Mon Sep 17 00:00:00 2001
From: Alex <apuret@takima.fr>
Date: Mon, 6 Dec 2021 18:18:40 +0100
Subject: [PATCH] fix(ci): wrong registry docker image path

---
 .gitlab-ci.yml | 2 +-
 build.sh       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4e523d8..f03414a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ build:
     - export TAG=${CI_COMMIT_TAG:-latest}
   script:
     - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.e-biz.fr
-    - ./build.sh $TAG
+    - ./build.sh $TAG $CI_REGISTRY_IMAGE
     - docker push $CI_REGISTRY_IMAGE:$TAG
   rules:
     - if: '$CI_COMMIT_BRANCH == "main"'
\ No newline at end of file
diff --git a/build.sh b/build.sh
index fbaf036..139cf5c 100755
--- a/build.sh
+++ b/build.sh
@@ -3,5 +3,6 @@
 set -e
 
 TAG=${1:-latest}
+REGISTRY=${2:-theia}
 
-docker build --build-arg "version=$TAG" . -t "theia:$TAG" --no-cache
\ No newline at end of file
+docker build --build-arg "version=$TAG" . -t "$REGISTRY:$TAG" --no-cache
\ No newline at end of file
-- 
GitLab