From 361a3509ddab0dab7d8c41592aa605cfea413e51 Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Mon, 6 May 2024 12:58:00 -0400 Subject: [PATCH] Multi-platform images Signed-off-by: Michael Edgar --- .github/workflows/integration.yml | 17 ++++++++++++++++- .github/workflows/release.yml | 9 ++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c09b8251e..90e1c098d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -27,6 +27,12 @@ jobs: restore-keys: | ${{ runner.os }}-maven- + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and Test env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} @@ -40,7 +46,9 @@ jobs: # # See: https://quarkus.io/guides/tests-with-coverage#coverage-for-integration-tests # - mvn verify -Pdocker -B --no-transfer-progress -Dquarkus.package.write-transformed-bytecode-to-build-output=true + mvn verify -Pdocker -B --no-transfer-progress \ + -Dquarkus.package.write-transformed-bytecode-to-build-output=true \ + -Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64 - name: Archive Results uses: actions/upload-artifact@v4 @@ -74,10 +82,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build UI Image uses: docker/build-push-action@v6 with: context: ui/ + platforms: linux/amd64,linux/arm64 push: false tags: | streamshub/console-ui:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 787300b86..a2167e606 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,12 @@ jobs: java-version: '17' distribution: 'adopt' + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and Push API Image run: | git config --global user.name "github-actions[bot]" @@ -49,7 +55,7 @@ jobs: export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=latest export GIT_REVISION=$(git rev-parse --short release) # Build and push the release images using the commit tagged in `release:prepare` - mvn -B -P docker release:perform + mvn -B -P docker release:perform -Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64 - name: Login to Quay uses: docker/login-action@v3 @@ -62,6 +68,7 @@ jobs: uses: docker/build-push-action@v6 with: context: ui/ + platforms: linux/amd64,linux/arm64 push: true tags: | ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{steps.metadata.outputs.current-version}}