diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c67e7e..31fe56d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,15 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - id: docker-metadata + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} - name: ${{ github.ref == 'refs/heads/main' && 'Build and Push Docker image' || 'Build Docker image' }} uses: docker/build-push-action@v5 with: push: ${{ github.ref == 'refs/heads/main'}} - tags: ghcr.io/${{ github.repository }}:latest + tags: ${{ steps.docker-metadata.outputs.tags }} + labels: ${{ steps.docker-metadata.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max