@@ -48,22 +48,34 @@ jobs:
4848 with :
4949 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5050 tags : |
51- type=semver,pattern={{version}}
52- type=semver,pattern={{version}}-${{ matrix.type }}
53- type=semver,pattern={{major}}.{{minor}}
54- type=semver,pattern={{major}}.{{minor}}-${{ matrix.type }}
55- type=semver,pattern={{major}}
56- type=semver,pattern={{major}}-${{ matrix.type }}
5751 type=sha
5852
53+ - name : Extract metadata (tags, labels) for Docker
54+ id : tagging
55+ uses : HackerHappyHour/tagging-strategy@v3
56+ with :
57+ image_name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
58+ tag_name : ${{ github.event.release.tag_name }}
59+ tags : |
60+ %X%-${{ matrix.type}}
61+ %X.Y%-${{ matrix.type}}
62+ %X.Y.Z%-${{ matrix.type}}
63+ extra_tags : |
64+ latest::${{ matrix.type == 'external'}}
65+ %X%::${{ matrix.type == 'external'}}
66+ %X.Y%::${{ matrix.type == 'external'}}
67+ %X.Y.Z%::${{ matrix.type == 'external'}}
68+
5969 - name : Build and push Docker image
6070 uses : docker/build-push-action@v6
6171 with :
6272 context : .
6373 file : Dockerfile.${{ matrix.type }}
6474 platforms : ${{ env.platforms }}
6575 push : true
66- tags : ${{ steps.meta.outputs.tags }}
76+ tags : |
77+ ${{ steps.tagging.outputs.tags }}
78+ ${{ steps.meta.outputs.tags }}
6779 labels : ${{ steps.meta.outputs.labels }}
6880
6981 - name : Version output
0 commit comments