From f568b145440fda0a11d36c3aac6c6812e72769f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 4 Apr 2023 15:21:38 +0200 Subject: [PATCH] Generate correct docker tags from git tags --- .github/workflows/container-registry-ghcr.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container-registry-ghcr.yaml b/.github/workflows/container-registry-ghcr.yaml index c1ac56a2..27c449b1 100644 --- a/.github/workflows/container-registry-ghcr.yaml +++ b/.github/workflows/container-registry-ghcr.yaml @@ -31,7 +31,13 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} - tags: type=raw,value=latest,enable={{is_default_branch}} + tags: |- + # https://github.com/docker/metadata-action#latest-tag + type=raw,value=latest,enable={{is_default_branch}} + # https://github.com/docker/metadata-action#typesemver + type=semver,pattern={{raw}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} - name: Build and push Docker image uses: docker/build-push-action@v4 with: