From df269822226afc3f9e5edaeedbbdf52addc75f24 Mon Sep 17 00:00:00 2001 From: Peter Kurfer <peter@icb4dc0.de> Date: Wed, 12 Feb 2025 16:30:41 +0100 Subject: [PATCH] fix(act): split image build into multiple jobs --- .forgejo/workflows/act_runtime.yaml | 40 ++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/act_runtime.yaml b/.forgejo/workflows/act_runtime.yaml index d8468c9..24441f6 100644 --- a/.forgejo/workflows/act_runtime.yaml +++ b/.forgejo/workflows/act_runtime.yaml @@ -14,13 +14,16 @@ env: LLVM_VERSIONS: '{"24.04": "19", "22.04": "15"}' jobs: - build_images: + build: strategy: matrix: - base_tage: + arch: + - arm64 + - amd64 + base_tag: - "22.04" - "24.04" - runs-on: ubuntu-latest-amd64 + runs-on: ubuntu-latest-${{ matrix.arch }} steps: - name: Checkout uses: actions/checkout@v4 @@ -39,8 +42,31 @@ jobs: with: context: "./act_runtime" push: true - platforms: linux/amd64,linux/arm64 - tags: code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tage }} + tags: code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tag }}-${{ matrix.arch }} build-args: | - BASE_IMAGE=ubuntu:${{ matrix.base_tage }} - LLVM_VERSION=${{ fromJSON(env.LLVM_VERSIONS)[matrix.base_tage] }} + BASE_IMAGE=ubuntu:${{ matrix.base_tag }} + LLVM_VERSION=${{ fromJSON(env.LLVM_VERSIONS)[matrix.base_tag] }} + + manifest: + strategy: + matrix: + base_tag: + - "22.04" + - "24.04" + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Login to container registry + uses: docker/login-action@v3 + with: + registry: code.icb4dc0.de + username: prskr + password: ${{ secrets.RELEASE_TOKEN }} + + - name: Create manifest + run: | + docker manifest create code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tag }} \ + --amend code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tag }}-arm64 \ + --amend code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tag }}-amd64 + docker manifest push code.icb4dc0.de/infrastructure/images/act_runtime:${{ matrix.base_tag }}