From 3c800942639da8273adfe6d9be6d27efedc82d4e Mon Sep 17 00:00:00 2001
From: Frank Sauerburger <frank@sauerburger.com>
Date: Tue, 13 Feb 2024 20:15:02 +0100
Subject: [PATCH] Fix build credentials

---
 .gitlab-ci.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a420c3..551805f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,14 +11,14 @@ build:
   rules:
     - if: $CI_COMMIT_TAG
   script:
-    - echo "{\"auths\":{\"${DOCKERHUB_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${DOCKERHUB_REGISTRY_USER}" "${DOCKERHUB_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
+    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
     - /kaniko/executor
       --context "${CI_PROJECT_DIR}"
       --dockerfile "${CI_PROJECT_DIR}/Dockerfile"
-      --destination "${DOCKERHUB_REPO}:${CI_COMMIT_TAG}"
+      --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
     - |
-      cat << EOF  > deploy.env
-      DOCKER_IMAGE=${DOCKERHUB_REPO}:${CI_COMMIT_TAG}
+      cat << EOF > deploy.env
+      DOCKER_IMAGE=${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
       EOF
   after_script:
     - cat deploy.env
-- 
GitLab