From 2654a6902afbf87d616a364cf7eb269360a75de9 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 22 Nov 2024 18:50:03 +0100 Subject: [PATCH] Fix building docker tag names --- .github/workflows/readme-release.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/readme-release.yml b/.github/workflows/readme-release.yml index f4cccbe..b61e08a 100644 --- a/.github/workflows/readme-release.yml +++ b/.github/workflows/readme-release.yml @@ -175,6 +175,15 @@ jobs: uses: docker/setup-buildx-action@v2 with: install: true + - + name: Define versions + if: env.VERSIONTAG_THIS != '' + id: define-versions + run: | + printf 'mayor-minor-patch=%s\n' "$VERSIONTAG_THIS" >>"$GITHUB_OUTPUT" + printf 'mayor-minor=%s\n' "${VERSIONTAG_THIS%.*}" >>"$GITHUB_OUTPUT" + printf 'mayor=%s\n' "${VERSIONTAG_THIS%%.*}" >>"$GITHUB_OUTPUT" + printf 'latest=latest\n' "${VERSIONTAG_THIS%%.*}" >>"$GITHUB_OUTPUT" - name: Build and push docker image if: env.VERSIONTAG_THIS != '' @@ -182,10 +191,10 @@ jobs: with: push: true tags: | - mlocati/php-extension-installer:$VERSIONTAG_THIS - mlocati/php-extension-installer:${VERSIONTAG_THIS%.*} - mlocati/php-extension-installer:${VERSIONTAG_THIS%%.*} - mlocati/php-extension-installer:latest + mlocati/php-extension-installer:${{ steps.define-versions.outputs.mayor-minor-patch }} + mlocati/php-extension-installer:${{ steps.define-versions.outputs.mayor-minor }} + mlocati/php-extension-installer:${{ steps.define-versions.outputs.mayor }} + mlocati/php-extension-installer:${{ steps.define-versions.outputs.latest }} # Build for all platforms also supported by php images (https://hub.docker.com/_/php/tags) platforms: | linux/386