Fix building docker tag names

pull/1013/head 2.7.0
Michele Locati 2024-11-22 18:50:03 +01:00
parent f14530fa61
commit 2654a6902a
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 13 additions and 4 deletions

View File

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