فهرست منبع

ci: fix tags

Signed-off-by: rare-magma <[email protected]>
rare-magma 1 سال پیش
والد
کامیت
e488bc44f6
1فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 7 6
      .github/workflows/docker-publish.yml

+ 7 - 6
.github/workflows/docker-publish.yml

@@ -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