From d2ae185428455e4a874e58844a50471465072413 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 ++++++++++++---- docker-compose.yaml | 2 +- 2 files changed, 13 insertions(+), 5 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}} diff --git a/docker-compose.yaml b/docker-compose.yaml index e9b243c..952fb7b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -63,6 +63,6 @@ services: mail: container_name: mvm_mail - image: mailhog/mailhog:v1.0.1 + image: jcalonso/mailhog:v1.0.1 ports: - "8025:8025" \ No newline at end of file