From a62ce29d34ee14ee0c29aef9721c11b87769846e Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Wed, 10 Jul 2024 05:39:06 -0600 Subject: [PATCH] ci: multi-arch build --- .github/workflows/ghcr-push.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ghcr-push.yml b/.github/workflows/ghcr-push.yml index f48e16c..71b21d6 100644 --- a/.github/workflows/ghcr-push.yml +++ b/.github/workflows/ghcr-push.yml @@ -20,15 +20,24 @@ jobs: steps: - uses: actions/checkout@v4 name: Checkout - - - name: Build - run: | - docker build -f clang-format-16.dockerfile -t ghcr.io/cwpearson/clang-format-16:latest . - - - name: Publish to GHCR + - + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to GHCR run: | echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin - docker push ghcr.io/cwpearson/clang-format-16:latest + - name: Build and Push + uses: docker/build-push-action@v2 + with: + file: clang-format-16.dockerfile + push: true + platforms: linux/amd64,linux/arm64,linux/ppc64le + tags: | + ghcr.io/${{ github.repository_owner }}/clang-format-16:latest build-8: name: Build + Publish 8 runs-on: ubuntu-latest