From 43da32a91c06deac4b9a70af631dc502817fc616 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 31 Jan 2023 19:50:24 +0000 Subject: [PATCH] Arm docker support (#19) --- .github/workflows/push-docker.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 0d18d6cf..11715792 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -38,23 +38,20 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_API }} - - - name: Build and push - uses: docker/build-push-action@v3 + - name: Setup buildx + run: | + docker buildx create --name mybuilder + docker buildx use mybuilder + + - name: Build and push versioned amd64 and v8 if: github.ref == 'refs/heads/main' - with: - context: . - push: true - tags: | - frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }} + run: | + docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}" . - - name: Build and push - uses: docker/build-push-action@v3 + + - name: Build and push latest amd64 and v8 if: github.ref == 'refs/heads/master' - with: - context: . - push: true - tags: | - frooodle/s-pdf:latest - - + run: | + docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:latest" . + +