From 5bddc450966aa1674559d391242e06ec41f75013 Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Sun, 25 Oct 2026 09:55:47 +0100 Subject: [PATCH] Set container registry as environment variable in deploy workflow - Add `REGISTRY` environment variable for clarity and reuse. - Update `docker/login-action` to use `REGISTRY` variable. - Remove inline registry computation for maintainability. --- .gitea/workflows/deploy-image.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-image.yml b/.gitea/workflows/deploy-image.yml index c3876ad..a196eaf 100644 --- a/.gitea/workflows/deploy-image.yml +++ b/.gitea/workflows/deploy-image.yml @@ -9,6 +9,9 @@ on: - 'feature/*' workflow_dispatch: +env: + REGISTRY: git.mein-gateway.de + jobs: build-and-push: runs-on: ubuntu-latest @@ -23,7 +26,6 @@ jobs: - name: Compute image name and tag id: compute-tag run: | - REGISTRY=$(echo "${{ github.server_url }}" | sed 's|https\?://||') OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') ACTOR=$(echo "${{ github.actor }}" | tr '[:upper:]' '[:lower:]') IMAGE_NAME="javadocviewerservice" @@ -61,7 +63,7 @@ jobs: - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: - registry: git.mein-gateway.de + registry: ${{ env.REGISTRY }} username: thischwa password: ${{ secrets.REGISTRY_TOKEN }}