From e003d8fe5b5e70ab0f259f6cf1bf2d1748628f06 Mon Sep 17 00:00:00 2001 From: Javier Martinez Date: Thu, 18 Jul 2024 12:46:55 +0200 Subject: [PATCH] another try --- .github/workflows/generate-release.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate-release.yml b/.github/workflows/generate-release.yml index 45837d7b3..208c48cad 100644 --- a/.github/workflows/generate-release.yml +++ b/.github/workflows/generate-release.yml @@ -48,14 +48,24 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=semver,pattern={{version}} - type=semver,pattern={{version}}-${{ matrix.type }} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}}.{{minor}}-${{ matrix.type }} - type=semver,pattern={{major}} - type=semver,pattern={{major}}-${{ matrix.type }} type=sha + - name: Extract metadata (tags, labels) for Docker + id: tagging + uses: HackerHappyHour/tagging-strategy@v3 + with: + image_name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tag_name: ${{ github.event.release.tag_name }} + tags: | + %X%-${{ matrix.type}} + %X.Y%-${{ matrix.type}} + %X.Y.Z%-${{ matrix.type}} + extra_tags: | + latest::${{ matrix.type == 'external'}} + %X%::${{ matrix.type == 'external'}} + %X.Y%::${{ matrix.type == 'external'}} + %X.Y.Z%::${{ matrix.type == 'external'}} + - name: Build and push Docker image uses: docker/build-push-action@v6 with: @@ -63,7 +73,9 @@ jobs: file: Dockerfile.${{ matrix.type }} platforms: ${{ env.platforms }} push: true - tags: ${{ steps.meta.outputs.tags }} + tags: | + ${{ steps.tagging.outputs.tags }} + ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Version output