Skip to content

Commit 5dce316

Browse files
committed
Update Docker GitHub Actions to standardize REGISTRY and IMAGE_NAME environment variables in feat/build-fix
Signed-off-by: thilob97 <[email protected]>
1 parent 5dc457b commit 5dce316

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/docker-build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
REGISTRY: ghcr.io
13-
IMAGE_NAME: ${{ github.repository }}
13+
IMAGE_NAME: ${{ github.repository_owner | lower }}/${{ github.event.repository.name | lower }}
1414

1515
jobs:
1616
build-and-push:

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
- minor
1717
- major
1818

19+
env:
20+
REGISTRY: ghcr.io
21+
IMAGE_NAME: ${{ github.repository_owner | lower }}/${{ github.event.repository.name | lower }}
22+
1923
jobs:
2024
release:
2125
runs-on: ubuntu-latest
@@ -65,7 +69,7 @@ jobs:
6569
- name: GHCR Login
6670
uses: docker/login-action@v2
6771
with:
68-
registry: ghcr.io
72+
registry: ${{ env.REGISTRY }}
6973
username: ${{ github.actor }}
7074
password: ${{ secrets.GITHUB_TOKEN }}
7175

@@ -75,8 +79,8 @@ jobs:
7579
context: .
7680
push: true
7781
tags: |
78-
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.VERSION }}
79-
ghcr.io/${{ github.repository }}:latest
82+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
83+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
8084
8185
- name: Erstelle und pushe Git-Tag
8286
run: |

0 commit comments

Comments
 (0)