Skip to content

Commit

Permalink
Fix building docker tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Nov 22, 2024
1 parent f14530f commit 2654a69
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/readme-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,26 @@ 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 != ''
uses: docker/build-push-action@v5
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
Expand Down

0 comments on commit 2654a69

Please sign in to comment.