Merge pull request #2 from voko/feature/extend-tagging

update pipeline to use latest and branch tags
This commit is contained in:
Volker Kopetzky
2025-12-25 23:05:09 +01:00
committed by GitHub
+20 -2
View File
@@ -3,7 +3,10 @@ name: Docker Publish
on: on:
push: push:
branches: [ "main" ] branches:
- "main"
- "fix/*"
- "feature/*"
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
@@ -31,6 +34,20 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} 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 - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@@ -40,6 +57,7 @@ jobs:
context: . context: .
target: final target: final
push: true 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-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max