From 22d8fc40339bfcb115bfdfc6e40ee822085f35cd Mon Sep 17 00:00:00 2001 From: Volker Date: Thu, 25 Dec 2025 23:02:24 +0100 Subject: [PATCH] update pipeline to use latest and branch tags --- .github/workflows/docker-publish.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index ec53ea1..0e157db 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,7 +3,10 @@ name: Docker Publish on: push: - branches: [ "main" ] + branches: + - "main" + - "fix/*" + - "feature/*" env: REGISTRY: ghcr.io @@ -31,6 +34,20 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value={{version}},enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=branch + flavor: | + latest=false + prefix= + suffix= + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -40,6 +57,7 @@ jobs: context: . target: final push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.TAG }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max