From 0fb252d7ca540b6538b5a1122a948f37eb0899a1 Mon Sep 17 00:00:00 2001 From: dd di cesare Date: Mon, 4 Nov 2024 13:59:15 +0100 Subject: [PATCH] [git] Catalog build for different architectures Signed-off-by: dd di cesare --- .github/workflows/build-images.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 05294987..65af49c6 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -162,6 +162,9 @@ jobs: name: Build and push catalog image needs: [build, build-bundle] runs-on: ubuntu-20.04 + strategy: + matrix: + arch: [ amd64, arm64, ppc64le, s390x ] if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/v') # We cannot use `env.MAIN_BRANCH_NAME` because `env` context is not available to `job.if`. See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability steps: - name: Set up Go 1.21.x @@ -212,7 +215,8 @@ jobs: REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} \ VERSION=${{ env.VERSION }} \ AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} \ - CHANNELS=${{ inputs.channels }} + CHANNELS=${{ inputs.channels }} \ + CATALOG_ARCH=${{ matrix.arch }} - name: Git diff run: git diff - name: Build Image @@ -221,7 +225,7 @@ jobs: with: image: ${{ env.OPERATOR_NAME }}-catalog tags: ${{ env.IMG_TAGS }} - platforms: linux/amd64,linux/arm64 + platforms: linux/${{ matrix.arch }} context: ./catalog dockerfiles: | ./catalog/${{ env.OPERATOR_NAME }}-catalog.Dockerfile