From 288de197cc07cc600d2124c305ec33d5c52782d3 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 31 Oct 2023 22:53:01 +0000 Subject: [PATCH] add multi arch --- .github/workflows/build-image-jung2bot.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-image-jung2bot.yml b/.github/workflows/build-image-jung2bot.yml index 8682866fa..5bcfd617c 100644 --- a/.github/workflows/build-image-jung2bot.yml +++ b/.github/workflows/build-image-jung2bot.yml @@ -18,12 +18,19 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -33,10 +40,11 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image - uses: docker/build-push-action@v2 + - name: Build and push + uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}