From 6b8a77695215f8f629b8703c8f3054e93c78580e Mon Sep 17 00:00:00 2001 From: Owen Campbell Date: Wed, 17 Jan 2024 12:36:14 +0000 Subject: [PATCH 1/3] Add multi-platform runtime image --- .github/workflows/client.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 7e6fcb804f..f7d960575f 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -146,6 +146,20 @@ jobs: push: false context: . + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build multi-platform Runtime Inage + uses: docker/build-push-action/v3 + with: + target: runtime-docker + platforms: linux/amd64,linux/arm64 + labels: | + version=${{ env.version }} + revision=${{ env.revision }} + push: false + context: . + - name: Login to Google Container Registry if: github.event_name == 'workflow_dispatch' uses: docker/login-action@v2 @@ -176,6 +190,29 @@ jobs: push: true context: . + - name: Build and publish multi-platform Docker Runtime Image + if: github.event_name == 'workflow_dispatch' + uses: docker/build-push-action@v3 + env: + IMAGE_NAME: "keep-client-mp" + with: + target: runtime-docker + platforms: linux/amd64, linux/arm64 + tags: | + ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }} + ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.version }} + ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.environment }} + ${{ env.GCR_REGISTRY_URL }}/${{ env.GOOGLE_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.version }}-${{ github.event.inputs.environment }} + labels: | + version=${{ env.version }} + revision=${{ env.revision }} + build-args: | + ENVIRONMENT=${{ github.event.inputs.environment }} + VERSION=${{ env.version }} + REVISION=${{ env.revision }} + push: true + context: . + - name: Build Client Binaries uses: docker/build-push-action@v3 with: From 960e710815422cfbbb479ffc57c4061dede5b386 Mon Sep 17 00:00:00 2001 From: Owen Campbell Date: Wed, 17 Jan 2024 12:39:58 +0000 Subject: [PATCH 2/3] Fix typo --- .github/workflows/client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index f7d960575f..0ec5008d77 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -150,7 +150,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Build multi-platform Runtime Inage - uses: docker/build-push-action/v3 + uses: docker/build-push-action@v3 with: target: runtime-docker platforms: linux/amd64,linux/arm64 From 46de3aadca26c11fd18dad07dea8835fa306de78 Mon Sep 17 00:00:00 2001 From: Owen Campbell Date: Wed, 17 Jan 2024 12:49:47 +0000 Subject: [PATCH 3/3] Add missing conditional --- .github/workflows/client.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 0ec5008d77..8eb69c4068 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -150,6 +150,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Build multi-platform Runtime Inage + if: github.event_name != 'workflow_dispatch' uses: docker/build-push-action@v3 with: target: runtime-docker