From dedccd1c8748eb753709968981c4c15dd60a1b14 Mon Sep 17 00:00:00 2001 From: Andrew Gardener Date: Wed, 6 Dec 2023 16:55:42 -0800 Subject: [PATCH] Add multi-platform image builds --- .github/workflows/main.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 538153f..bedadd0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -19,8 +19,11 @@ jobs: touch .env.test.local echo DATABASE_URL="mysql://mvm:password@127.0.0.1:3306/mvm?serverVersion=mariadb-10.11.0" >> .env.test.local + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 @@ -39,9 +42,10 @@ jobs: mysql password: password - name: Build MVM - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 load: true pull: true tags: dhilsfu/mvm:latest @@ -64,8 +68,11 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 @@ -74,9 +81,10 @@ jobs: password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Build & Push Symfony Base - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 push: true pull: true tags: dhilsfu/mvm:latest,dhilsfu/mvm:${{github.ref_name}}