From 10c630c4f956c229e2f780a02d30cda94134c7ca Mon Sep 17 00:00:00 2001 From: Ukang'a Dickson Date: Tue, 7 May 2024 14:40:54 +0300 Subject: [PATCH] Build the platform specific images in parallel --- .github/workflows/ecr-image-build.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ecr-image-build.yml b/.github/workflows/ecr-image-build.yml index d153f2d0d3..d72409729d 100644 --- a/.github/workflows/ecr-image-build.yml +++ b/.github/workflows/ecr-image-build.yml @@ -18,7 +18,18 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + paltform: + - linux/amd64 + - linux/arm64 steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@v4 @@ -64,7 +75,7 @@ jobs: with: context: . file: ./docker/onadata-uwsgi/Dockerfile.ubuntu - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version }} cache-to: type=inline ssh: | @@ -82,7 +93,7 @@ jobs: with: context: . file: ./docker/onadata-uwsgi/Dockerfile.alpine - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version }} cache-to: type=inline ssh: |