Skip to content

Commit

Permalink
Fix Docker image tagging in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kroonen committed Sep 8, 2024
1 parent b66c640 commit 9b8a664
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository | lowercase }}

jobs:
build-and-push-image:
Expand All @@ -28,9 +27,16 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 9b8a664

Please sign in to comment.