Set container registry as environment variable in deploy workflow
Build and Push Docker Image / build-and-push (push) Successful in 22s
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:
1 parent
3bc6401bd7
commit
5bddc45096
1 file changed
+4
-2
@@ -9,6 +9,9 @@ on:
|
|||||||
- 'feature/*'
|
- 'feature/*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.mein-gateway.de
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -23,7 +26,6 @@ jobs:
|
|||||||
- name: Compute image name and tag
|
- name: Compute image name and tag
|
||||||
id: compute-tag
|
id: compute-tag
|
||||||
run: |
|
run: |
|
||||||
REGISTRY=$(echo "${{ github.server_url }}" | sed 's|https\?://||')
|
|
||||||
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
|
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
|
||||||
ACTOR=$(echo "${{ github.actor }}" | tr '[:upper:]' '[:lower:]')
|
ACTOR=$(echo "${{ github.actor }}" | tr '[:upper:]' '[:lower:]')
|
||||||
IMAGE_NAME="javadocviewerservice"
|
IMAGE_NAME="javadocviewerservice"
|
||||||
@@ -61,7 +63,7 @@ jobs:
|
|||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.mein-gateway.de
|
registry: ${{ env.REGISTRY }}
|
||||||
username: thischwa
|
username: thischwa
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user