ci: fix tags

Signed-off-by: rare-magma <rare-magma@posteo.eu>
This commit is contained in:
rare-magma 2024-08-10 12:52:32 +02:00
parent 301e3f5234
commit e488bc44f6
No known key found for this signature in database

View file

@ -32,8 +32,10 @@ jobs:
include:
- dockerfile: ./Dockerfile
image: ghcr.io/${{ github.repository }}
flavour: ""
- dockerfile: ./Dockerfile.alpine
image: ghcr.io/${{ github.repository }}-alpine
image: ghcr.io/${{ github.repository }}
flavour: "-alpine"
permissions:
contents: read
packages: write
@ -69,12 +71,11 @@ jobs:
with:
images: ${{ matrix.image }}
tags: |
type=ref,event=branch
type=ref,event=pr
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest${{ matrix.flavour }},enable={{is_default_branch}}
type=semver,pattern={{major}}${{ matrix.flavour }}
type=semver,pattern={{major}}.{{minor}}${{ matrix.flavour }}
type=semver,pattern={{major}}.{{minor}}.{{patch}}${{ matrix.flavour }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action