Set container registry as environment variable in deploy workflow
Build and Push Docker Image / build-and-push (push) Successful in 22s

- Add `REGISTRY` environment variable for clarity and reuse.
- Update `docker/login-action` to use `REGISTRY` variable.
- Remove inline registry computation for maintainability.
This commit is contained in:
thischwa committed 2026-10-25 09:55:47 +01:00
1 parent 3bc6401bd7
commit 5bddc45096
1 file changed
+4 -2
+4 -2
View File
@@ -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 }}