Skip to content

Commit

Permalink
Use metadata action
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <lukas.heumos@posteo.net>
  • Loading branch information
Zethson committed Sep 3, 2023
1 parent 023f1ac commit c640356
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/publish_ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,19 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: |
latest
${{ env.IMAGE_NAME }}:${{ inputs.tag }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
env:
DOCKER_BUILDKIT: 1

0 comments on commit c640356

Please sign in to comment.