From d82055f3f3d2cfaaf329028a843786d2c2c98670 Mon Sep 17 00:00:00 2001 From: Javier Martinez Date: Fri, 2 Aug 2024 08:37:54 +0200 Subject: [PATCH] chore: update action --- .github/workflows/generate-release.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/generate-release.yml b/.github/workflows/generate-release.yml index 208c48cad..73ce4d781 100644 --- a/.github/workflows/generate-release.yml +++ b/.github/workflows/generate-release.yml @@ -9,6 +9,7 @@ env: REGISTRY: docker.io IMAGE_NAME: ${{ github.repository }} platforms: linux/amd64,linux/arm64 + DEFAULT_TYPE: "external" jobs: build-and-push-image: @@ -48,24 +49,11 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | + type=semver,pattern={{version}},enable=${{ matrix.type == env.DEFAULT_COMBINATION }} + type=semver,pattern={{version}}-${{ matrix.type }},priority=500 + type=raw,value=latest,enable=${{ matrix.type == env.DEFAULT_COMBINATION }} 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: @@ -73,9 +61,7 @@ jobs: file: Dockerfile.${{ matrix.type }} platforms: ${{ env.platforms }} push: true - tags: | - ${{ steps.tagging.outputs.tags }} - ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Version output