copy multi-build from other github action

This commit is contained in:
adamus1red 2020-10-11 02:26:55 +01:00 committed by GitHub
parent eef756e31a
commit 7beda59782
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,14 +170,28 @@ jobs:
if: github.event_name == 'push' if: github.event_name == 'push'
steps: steps:
- name: Checkout master - name: Checkout
uses: actions/checkout@master uses: actions/checkout@v2
- name: Build and publish image - name: Set up Docker Buildx
uses: ilteoood/docker_buildx@master id: buildx
uses: crazy-max/ghaction-docker-buildx@v3
with: with:
publish: true buildx-version: latest
imageName: adamus1red/nginx-proxy qemu-version: latest
platform: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 - name: Available platforms
dockerHubUser: ${{ secrets.DOCKER_USERNAME }} run: echo ${{ steps.buildx.outputs.platforms }}
dockerHubPassword: ${{ secrets.DOCKER_PASSWORD }} - name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
run: |
docker buildx build \
--push -f Dockerfile \
--tag adamus1red/nginx-proxy:latest \
--platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 .
- name: build the alpine stable image
run: |
docker buildx build \
--push -f Dockerfile.alpine \
--tag adamus1red/nginx-proxy:latest-alpine \
--platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 .