Use multi-arch building to have arm64 and amd64 images on docker hub (#1009)
parent
556b82af60
commit
5505242a8f
|
@ -170,19 +170,31 @@ jobs:
|
||||||
username: mlocati
|
username: mlocati
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build docker image
|
name: Set up docker buildx
|
||||||
if: env.VERSIONTAG_THIS != ''
|
uses: docker/setup-buildx-action@v2
|
||||||
run: >
|
with:
|
||||||
docker build
|
install: true
|
||||||
--tag "mlocati/php-extension-installer:$VERSIONTAG_THIS"
|
|
||||||
--tag "mlocati/php-extension-installer:${VERSIONTAG_THIS%.*}"
|
|
||||||
--tag "mlocati/php-extension-installer:${VERSIONTAG_THIS%%.*}"
|
|
||||||
--tag mlocati/php-extension-installer:latest
|
|
||||||
.
|
|
||||||
-
|
-
|
||||||
name: Push docker image to Docker Hub
|
name: Build and push docker image
|
||||||
if: env.VERSIONTAG_THIS != ''
|
if: env.VERSIONTAG_THIS != ''
|
||||||
run: docker push --all-tags mlocati/php-extension-installer
|
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
|
||||||
|
# Build for all platforms also supported by php images (https://hub.docker.com/_/php/tags)
|
||||||
|
platforms: |
|
||||||
|
linux/386
|
||||||
|
linux/amd64
|
||||||
|
linux/arm/v5
|
||||||
|
linux/arm/v7
|
||||||
|
linux/arm64/v8
|
||||||
|
linux/mips64le
|
||||||
|
linux/ppc64le
|
||||||
|
linux/s390x
|
||||||
-
|
-
|
||||||
name: Create release
|
name: Create release
|
||||||
if: env.VERSIONTAG_THIS != ''
|
if: env.VERSIONTAG_THIS != ''
|
||||||
|
|
Loading…
Reference in New Issue