Skip to content

Commit

Permalink
🐛 Fix docker image naming by including repository owner and convertin…
Browse files Browse the repository at this point in the history
…g name to lowercase
  • Loading branch information
Malte2036 committed Dec 14, 2024
1 parent 20e278f commit 8f17a2f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ github.repository_owner }}/${{ github.event.repository.name }}

jobs:
build-and-push:
Expand All @@ -20,6 +20,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Convert repository name to lowercase
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
Expand All @@ -36,6 +40,6 @@ jobs:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.REPO_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 8f17a2f

Please sign in to comment.