From 3e01a7d96468bb0c0a3f3e6ddc6169b8d463ef15 Mon Sep 17 00:00:00 2001 From: Jacques Supcik Date: Sat, 29 Jan 2022 23:29:17 +0100 Subject: [PATCH] add ARM image --- .github/workflows/docker-publish.yml | 42 ++++++++++++++++++---------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5b1d773..e159e8f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -4,7 +4,6 @@ on: push: branches: - main - tags: - v* @@ -14,28 +13,43 @@ env: IMAGE_NAME: pandoc-le jobs: - docker: + build-and-push: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Checkout + uses: actions/checkout@v2 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + heiafr/pandoc-le + + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx + + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 + + - name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + + - name: Login to DockerHub + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + + - name: Build and push id: docker_build uses: docker/build-push-action@v2 with: + context: . + platforms: linux/amd64,linux/arm64 push: true - tags: heiafr/pandoc-le:latest - - - name: Image digest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }}