From e054bb3490c785e514163ac03e1e28f3c459c222 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Tue, 10 Feb 2026 13:31:55 +0100 Subject: [PATCH] fix: deploy --- .gitea/workflows/ci.yml | 5 +++-- .gitea/workflows/deploy.yml | 11 +++++++---- Dockerfile | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4ee1794c..2debe967 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,8 +27,9 @@ jobs: - name: 🔐 Configure Private Registry run: | - echo "@mintel:registry=https://npm.infra.mintel.me" > .npmrc - echo "//npm.infra.mintel.me/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc + REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" + echo "@mintel:registry=https://$REGISTRY" > .npmrc + echo "//$REGISTRY/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc - name: Install dependencies run: pnpm install diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 77479ef5..e6f3c237 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -175,8 +175,9 @@ jobs: - name: 🔐 Configure Private Registry run: | - echo "@mintel:registry=https://npm.infra.mintel.me" > .npmrc - echo "//npm.infra.mintel.me/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc + REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" + echo "@mintel:registry=https://$REGISTRY" > .npmrc + echo "//$REGISTRY/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc - name: Install dependencies run: pnpm install @@ -234,6 +235,7 @@ jobs: --build-arg NEXT_PUBLIC_BASE_URL="$NEXT_PUBLIC_BASE_URL" \ --build-arg NEXT_PUBLIC_TARGET="$TARGET" \ --build-arg DIRECTUS_URL="$DIRECTUS_URL" \ + --build-arg REGISTRY_HOST="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" \ --build-arg NPM_TOKEN="${{ secrets.REGISTRY_PASS }}" \ -t registry.infra.mintel.me/mintel/klz-cables.com:$IMAGE_TAG \ --cache-from type=registry,ref=registry.infra.mintel.me/mintel/klz-cables.com:buildcache \ @@ -433,8 +435,9 @@ jobs: - name: 🔐 Configure Private Registry run: | - echo "@mintel:registry=https://npm.infra.mintel.me" > .npmrc - echo "//npm.infra.mintel.me/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc + REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" + echo "@mintel:registry=https://$REGISTRY" > .npmrc + echo "//$REGISTRY/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc - name: Install dependencies run: pnpm install diff --git a/Dockerfile b/Dockerfile index 47e97fe3..1cbe0e7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,12 @@ RUN npm install -g pnpm@10 # Install dependencies based on the preferred package manager COPY package.json pnpm-lock.yaml* ./ +ARG REGISTRY_HOST ARG NPM_TOKEN RUN if [ -n "$NPM_TOKEN" ]; then \ - echo "@mintel:registry=https://npm.infra.mintel.me" > .npmrc && \ - echo "//npm.infra.mintel.me/:_authToken=$NPM_TOKEN" >> .npmrc; \ + REGISTRY="${REGISTRY_HOST:-npm.infra.mintel.me}" && \ + echo "@mintel:registry=https://$REGISTRY" > .npmrc && \ + echo "//$REGISTRY/:_authToken=$NPM_TOKEN" >> .npmrc; \ fi RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile