From be5b7165af510c0dd4e68ebd8b6d3af10c60cc15 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Wed, 18 Feb 2026 16:03:04 -0300 Subject: [PATCH 01/19] Enhance workflow for multi-arch builds and registry Updated the GitHub Actions workflow to support multi-architecture builds for the extension, modifying the image name and registry details. --- .github/workflows/build-extension.yml | 129 +++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 0a66af2..cf5183a 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -1,17 +1,17 @@ -name: Build and Publish Extension [Container and Helm Chart] +name: Build and Publish Extension [Container and Helm Chart - Multi-Arch] on: [push, pull_request, workflow_dispatch] env: CHART_PATH: charts/suse-ai-lifecycle-manager - CHART_REGISTRY: oci://ghcr.io/suse/chart + CHART_REGISTRY: oci://ghcr.io/leooamaral/chart + IMAGE_NAME: ghcr.io/leooamaral/suse-ai-lifecycle-manager jobs: - build-extension: - name: Build Container Image and Helm Chart - runs-on: ubuntu-latest + build-amd64: + name: Build Container Image and Helm Chart - amd64 + runs-on: ubuntu-24.04 permissions: - actions: write contents: read packages: write steps: @@ -34,9 +34,85 @@ jobs: esac echo "##" >> "$GITHUB_OUTPUT" + - name: Configure Git + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Nodejs with yarn caching + uses: actions/setup-node@v5 + with: + node-version: '20' + cache: yarn + - name: Enable Corepack run: corepack enable + - name: Install dependencies + run: yarn + + - name: Parse Extension Name + if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + id: parsed-name + env: + GH_TOKEN: ${{ github.token }} + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} + run: | + yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" + + - name: Build and push UI image + if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + env: + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} + run: | + publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') + + if [[ -n "${{ env.RELEASE_TAG }}" ]]; then + publish+=(-t "$RELEASE_TAG") + fi + + "${publish[@]}" + + - name: Tag amd64 + if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + run: | + VERSION=$(jq -r .version package.json) + docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 + docker push $IMAGE_NAME:$VERSION-amd64 + + build-arm64: + name: Build Container Image and Helm Chart - arm64 + runs-on: ubuntu-24.04-arm + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Calculate tags + id: tags + shell: bash + run: | + echo "TAGS<<##" >> "$GITHUB_OUTPUT" + ref=${{ github.ref }} + case "$ref" in + refs/heads/main) + echo "latest" >> "$GITHUB_OUTPUT";; + refs/tags/*) + echo "${ref#refs/tags/}" >> "$GITHUB_OUTPUT";; + *) + echo "${{ github.sha }}" >> "$GITHUB_OUTPUT";; + esac + echo "##" >> "$GITHUB_OUTPUT" + - name: Configure Git run: | git config user.name 'github-actions[bot]' @@ -55,6 +131,9 @@ jobs: node-version: '20' cache: yarn + - name: Enable Corepack + run: corepack enable + - name: Install dependencies run: yarn @@ -72,7 +151,7 @@ jobs: env: RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - publish=(yarn publish-pkgs -c -p -i '' -r ghcr.io -o 'suse') + publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') if [[ -n "${{ env.RELEASE_TAG }}" ]]; then publish+=(-t "$RELEASE_TAG") @@ -80,19 +159,47 @@ jobs: "${publish[@]}" - - name: Re-checkout repository + - name: Tag arm64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - uses: actions/checkout@v4 + run: | + VERSION=$(jq -r .version package.json) + docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 + docker push $IMAGE_NAME:$VERSION-arm64 + + manifest: + needs: [build-amd64, build-arm64] + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create multi-arch manifest + run: | + VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's/^.*-//') + + docker manifest create $IMAGE_NAME:$VERSION \ + $IMAGE_NAME:$VERSION-amd64 \ + $IMAGE_NAME:$VERSION-arm64 + + docker manifest push $IMAGE_NAME:$VERSION - name: Package Helm Chart - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} id: package run: | chart_package=$(helm package $CHART_PATH --destination . | awk '{print $NF}') echo "chart_package=$chart_package" >> $GITHUB_OUTPUT - name: Publish Helm Chart - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | helm push ${{ steps.package.outputs.chart_package }} \ $CHART_REGISTRY From 3d4179bb5f9f4a30422d6e0850d7c38998c129e0 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Wed, 18 Feb 2026 16:21:11 -0300 Subject: [PATCH 02/19] Enhance multi-arch manifest creation in workflow Refactor Docker manifest creation to include amendments and annotations for multi-architecture support. --- .github/workflows/build-extension.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index cf5183a..41550fc 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -186,13 +186,20 @@ jobs: - name: Create multi-arch manifest run: | VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's/^.*-//') - + docker manifest create $IMAGE_NAME:$VERSION \ - $IMAGE_NAME:$VERSION-amd64 \ - $IMAGE_NAME:$VERSION-arm64 - + --amend $IMAGE_NAME:$VERSION-amd64 \ + --amend $IMAGE_NAME:$VERSION-arm64 + + docker manifest annotate $IMAGE_NAME:$VERSION \ + $IMAGE_NAME:$VERSION-amd64 --arch amd64 + + docker manifest annotate $IMAGE_NAME:$VERSION \ + $IMAGE_NAME:$VERSION-arm64 --arch arm64 + docker manifest push $IMAGE_NAME:$VERSION + - name: Package Helm Chart id: package run: | From 97db78c1a70646f940637da0c411fbc9dca3551e Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Wed, 18 Feb 2026 16:34:47 -0300 Subject: [PATCH 03/19] Replace docker manifest commands with buildx imagetools --- .github/workflows/build-extension.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 41550fc..61f8bb3 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -187,18 +187,10 @@ jobs: run: | VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's/^.*-//') - docker manifest create $IMAGE_NAME:$VERSION \ - --amend $IMAGE_NAME:$VERSION-amd64 \ - --amend $IMAGE_NAME:$VERSION-arm64 - - docker manifest annotate $IMAGE_NAME:$VERSION \ - $IMAGE_NAME:$VERSION-amd64 --arch amd64 - - docker manifest annotate $IMAGE_NAME:$VERSION \ - $IMAGE_NAME:$VERSION-arm64 --arch arm64 - - docker manifest push $IMAGE_NAME:$VERSION - + docker buildx imagetools create \ + -t $IMAGE_NAME:$VERSION \ + $IMAGE_NAME:$VERSION-amd64 \ + $IMAGE_NAME:$VERSION-arm64 - name: Package Helm Chart id: package From 073826796d527d5824b17373b525f8fbf935fcc3 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 10:20:52 -0300 Subject: [PATCH 04/19] Update image reference in Chart.yaml --- charts/suse-ai-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-operator/Chart.yaml b/charts/suse-ai-operator/Chart.yaml index 5297eda..645948d 100644 --- a/charts/suse-ai-operator/Chart.yaml +++ b/charts/suse-ai-operator/Chart.yaml @@ -1,6 +1,6 @@ annotations: helm.sh/images: | - - image: ghcr.io/suse/suse-ai-operator:0.1.0 + - image: ghcr.io/leooamaral/suse-ai-operator:0.1.0 name: suse-ai-operator license: Apache-2.0 apiVersion: v2 From 6893b5c92e85c82532def455e66bf378eaee1d9d Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 10:21:23 -0300 Subject: [PATCH 05/19] Update image reference in Chart.yaml --- charts/suse-ai-lifecycle-manager/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-lifecycle-manager/Chart.yaml b/charts/suse-ai-lifecycle-manager/Chart.yaml index 875544a..9430c6e 100644 --- a/charts/suse-ai-lifecycle-manager/Chart.yaml +++ b/charts/suse-ai-lifecycle-manager/Chart.yaml @@ -1,6 +1,6 @@ annotations: helm.sh/images: | - - image: ghcr.io/suse/suse-ai-lifecycle-manager:1.0.0 + - image: ghcr.io/leooamaral/suse-ai-lifecycle-manager:1.0.0 name: suse-ai-lifecycle-manager license: Apache-2.0 apiVersion: v2 From ecddf88011fe7faf63e0b755dc56476140c87383 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 10:21:55 -0300 Subject: [PATCH 06/19] Change image repository to leooamaral/suse-ai-lifecycle-manager --- charts/suse-ai-lifecycle-manager/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-lifecycle-manager/values.yaml b/charts/suse-ai-lifecycle-manager/values.yaml index 1c1677e..d138918 100644 --- a/charts/suse-ai-lifecycle-manager/values.yaml +++ b/charts/suse-ai-lifecycle-manager/values.yaml @@ -6,7 +6,7 @@ global: image: registry: ghcr.io - repository: suse/suse-ai-lifecycle-manager + repository: leooamaral/suse-ai-lifecycle-manager tag: "1.0.0" pullPolicy: IfNotPresent From 65b76ae455b4740fcc922f8ed9b971fc1ffbb602 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 14:11:46 -0300 Subject: [PATCH 07/19] Update image repository for SUSE AI Lifecycle Manager --- charts/suse-ai-lifecycle-manager/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-lifecycle-manager/values.yaml b/charts/suse-ai-lifecycle-manager/values.yaml index d138918..1c1677e 100644 --- a/charts/suse-ai-lifecycle-manager/values.yaml +++ b/charts/suse-ai-lifecycle-manager/values.yaml @@ -6,7 +6,7 @@ global: image: registry: ghcr.io - repository: leooamaral/suse-ai-lifecycle-manager + repository: suse/suse-ai-lifecycle-manager tag: "1.0.0" pullPolicy: IfNotPresent From a298bfb834efa3fd3fc0911520e272d59141c58b Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 14:12:17 -0300 Subject: [PATCH 08/19] Update image reference in Chart.yaml --- charts/suse-ai-lifecycle-manager/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-lifecycle-manager/Chart.yaml b/charts/suse-ai-lifecycle-manager/Chart.yaml index 9430c6e..875544a 100644 --- a/charts/suse-ai-lifecycle-manager/Chart.yaml +++ b/charts/suse-ai-lifecycle-manager/Chart.yaml @@ -1,6 +1,6 @@ annotations: helm.sh/images: | - - image: ghcr.io/leooamaral/suse-ai-lifecycle-manager:1.0.0 + - image: ghcr.io/suse/suse-ai-lifecycle-manager:1.0.0 name: suse-ai-lifecycle-manager license: Apache-2.0 apiVersion: v2 From c410981799107f14f61791c61222f7758e4bc354 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 14:12:38 -0300 Subject: [PATCH 09/19] Update values.yaml From afe4eb16db4b95a867201b4f4a0a2dba3ef27a42 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 14:13:01 -0300 Subject: [PATCH 10/19] Update image reference in Chart.yaml --- charts/suse-ai-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/suse-ai-operator/Chart.yaml b/charts/suse-ai-operator/Chart.yaml index 645948d..5297eda 100644 --- a/charts/suse-ai-operator/Chart.yaml +++ b/charts/suse-ai-operator/Chart.yaml @@ -1,6 +1,6 @@ annotations: helm.sh/images: | - - image: ghcr.io/leooamaral/suse-ai-operator:0.1.0 + - image: ghcr.io/suse/suse-ai-operator:0.1.0 name: suse-ai-operator license: Apache-2.0 apiVersion: v2 From 312c4fcea01f3726abf04f4f514b0f8d2e09603a Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 14:29:21 -0300 Subject: [PATCH 11/19] Update chart registry and image name in workflow --- .github/workflows/build-extension.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 61f8bb3..fbe8803 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -4,8 +4,8 @@ on: [push, pull_request, workflow_dispatch] env: CHART_PATH: charts/suse-ai-lifecycle-manager - CHART_REGISTRY: oci://ghcr.io/leooamaral/chart - IMAGE_NAME: ghcr.io/leooamaral/suse-ai-lifecycle-manager + CHART_REGISTRY: oci://ghcr.io/suse/chart + IMAGE_NAME: ghcr.io/suse/suse-ai-lifecycle-manager jobs: build-amd64: @@ -72,7 +72,7 @@ jobs: env: RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') + publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'suse') if [[ -n "${{ env.RELEASE_TAG }}" ]]; then publish+=(-t "$RELEASE_TAG") @@ -151,7 +151,7 @@ jobs: env: RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') + publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'suse') if [[ -n "${{ env.RELEASE_TAG }}" ]]; then publish+=(-t "$RELEASE_TAG") From 0e6cc271df52e47d91f0d3d9c33f9e2cb880f013 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 18:16:32 -0300 Subject: [PATCH 12/19] fix: add tag calculation in last extension job Add a step to calculate tags for Docker image versioning. --- .github/workflows/build-extension.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index fbe8803..9fd5bfb 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -176,6 +176,22 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + + - name: Calculate tags + id: tags + shell: bash + run: | + echo "TAGS<<##" >> "$GITHUB_OUTPUT" + ref=${{ github.ref }} + case "$ref" in + refs/heads/main) + echo "latest" >> "$GITHUB_OUTPUT";; + refs/tags/*) + echo "${ref#refs/tags/}" >> "$GITHUB_OUTPUT";; + *) + echo "${{ github.sha }}" >> "$GITHUB_OUTPUT";; + esac + echo "##" >> "$GITHUB_OUTPUT" - uses: docker/login-action@v3 with: @@ -184,8 +200,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Create multi-arch manifest + env: + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's/^.*-//') + VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') docker buildx imagetools create \ -t $IMAGE_NAME:$VERSION \ From be44abf04bbfcbb84b262f5f67b91a5d8b57103d Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 18:22:24 -0300 Subject: [PATCH 13/19] Add tag calculation step to build workflow --- .github/workflows/build-extension.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 61f8bb3..d855c33 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -176,6 +176,22 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + + - name: Calculate tags + id: tags + shell: bash + run: | + echo "TAGS<<##" >> "$GITHUB_OUTPUT" + ref=${{ github.ref }} + case "$ref" in + refs/heads/main) + echo "latest" >> "$GITHUB_OUTPUT";; + refs/tags/*) + echo "${ref#refs/tags/}" >> "$GITHUB_OUTPUT";; + *) + echo "${{ github.sha }}" >> "$GITHUB_OUTPUT";; + esac + echo "##" >> "$GITHUB_OUTPUT" - uses: docker/login-action@v3 with: @@ -184,8 +200,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Create multi-arch manifest + env: + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's/^.*-//') + VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') docker buildx imagetools create \ -t $IMAGE_NAME:$VERSION \ From e3c11b378a69ae3b770b664d9e45c2036933f5a3 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 18:33:44 -0300 Subject: [PATCH 14/19] Add RELEASE_TAG environment variable for tagging --- .github/workflows/build-extension.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index d855c33..913332d 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -82,8 +82,10 @@ jobs: - name: Tag amd64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + env: + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(jq -r .version package.json) + VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 docker push $IMAGE_NAME:$VERSION-amd64 @@ -161,8 +163,10 @@ jobs: - name: Tag arm64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} + env: + RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(jq -r .version package.json) + VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 docker push $IMAGE_NAME:$VERSION-arm64 From 4b172e080007d63fa5d291b1ddcd3ce0d9716ff7 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Thu, 19 Feb 2026 19:24:46 -0300 Subject: [PATCH 15/19] Refactor GitHub Actions workflow for image builds --- .github/workflows/build-extension.yml | 85 +++++++++------------------ 1 file changed, 29 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 913332d..daa4ea2 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -8,16 +8,11 @@ env: IMAGE_NAME: ghcr.io/leooamaral/suse-ai-lifecycle-manager jobs: - build-amd64: - name: Build Container Image and Helm Chart - amd64 - runs-on: ubuntu-24.04 - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v5 - + prepare: + runs-on: ubuntu-latest + outputs: + release_tag: ${{ steps.tags.outputs.TAGS }} + steps: - name: Calculate tags id: tags shell: bash @@ -34,6 +29,19 @@ jobs: esac echo "##" >> "$GITHUB_OUTPUT" + build-amd64: + name: Build Container Image and Helm Chart - amd64 + runs-on: ubuntu-24.04 + needs: prepare + env: + RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Configure Git run: | git config user.name 'github-actions[bot]' @@ -63,14 +71,13 @@ jobs: id: parsed-name env: GH_TOKEN: ${{ github.token }} - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" - name: Build and push UI image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} env: - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} + RELEASE_TAG: ${{ env.RELEASE_TAG }} run: | publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') @@ -82,38 +89,23 @@ jobs: - name: Tag amd64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - env: - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') + VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 docker push $IMAGE_NAME:$VERSION-amd64 build-arm64: name: Build Container Image and Helm Chart - arm64 runs-on: ubuntu-24.04-arm + needs: prepare + env: + RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v5 - - - name: Calculate tags - id: tags - shell: bash - run: | - echo "TAGS<<##" >> "$GITHUB_OUTPUT" - ref=${{ github.ref }} - case "$ref" in - refs/heads/main) - echo "latest" >> "$GITHUB_OUTPUT";; - refs/tags/*) - echo "${ref#refs/tags/}" >> "$GITHUB_OUTPUT";; - *) - echo "${{ github.sha }}" >> "$GITHUB_OUTPUT";; - esac - echo "##" >> "$GITHUB_OUTPUT" - name: Configure Git run: | @@ -144,14 +136,13 @@ jobs: id: parsed-name env: GH_TOKEN: ${{ github.token }} - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" - name: Build and push UI image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} env: - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} + RELEASE_TAG: ${{ env.RELEASE_TAG }} run: | publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') @@ -163,15 +154,15 @@ jobs: - name: Tag arm64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - env: - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') + VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 docker push $IMAGE_NAME:$VERSION-arm64 manifest: - needs: [build-amd64, build-arm64] + needs: [prepare, build-amd64, build-arm64] + env: + RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} runs-on: ubuntu-latest if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} permissions: @@ -180,22 +171,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 - - - name: Calculate tags - id: tags - shell: bash - run: | - echo "TAGS<<##" >> "$GITHUB_OUTPUT" - ref=${{ github.ref }} - case "$ref" in - refs/heads/main) - echo "latest" >> "$GITHUB_OUTPUT";; - refs/tags/*) - echo "${ref#refs/tags/}" >> "$GITHUB_OUTPUT";; - *) - echo "${{ github.sha }}" >> "$GITHUB_OUTPUT";; - esac - echo "##" >> "$GITHUB_OUTPUT" - uses: docker/login-action@v3 with: @@ -204,10 +179,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Create multi-arch manifest - env: - RELEASE_TAG: ${{ steps.tags.outputs.TAGS }} run: | - VERSION=$(echo "${RELEASE_TAG}" | sed 's/^.*-//') + VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') docker buildx imagetools create \ -t $IMAGE_NAME:$VERSION \ From 74537c8bede0c276a58b548c84bb86176b0c4a69 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Fri, 20 Feb 2026 10:03:18 -0300 Subject: [PATCH 16/19] Refactor UI image build process in workflow --- .github/workflows/build-extension.yml | 29 ++++++++------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index daa4ea2..c0dc457 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -76,21 +76,14 @@ jobs: - name: Build and push UI image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - env: - RELEASE_TAG: ${{ env.RELEASE_TAG }} run: | - publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') - - if [[ -n "${{ env.RELEASE_TAG }}" ]]; then - publish+=(-t "$RELEASE_TAG") - fi - - "${publish[@]}" + yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" - name: Tag amd64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | - VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + VERSION=${RELEASE_TAG##*-} docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 docker push $IMAGE_NAME:$VERSION-amd64 @@ -141,21 +134,14 @@ jobs: - name: Build and push UI image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - env: - RELEASE_TAG: ${{ env.RELEASE_TAG }} run: | - publish=(yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral') - - if [[ -n "${{ env.RELEASE_TAG }}" ]]; then - publish+=(-t "$RELEASE_TAG") - fi - - "${publish[@]}" + yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" - name: Tag arm64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | - VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + VERSION=${RELEASE_TAG##*-} docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 docker push $IMAGE_NAME:$VERSION-arm64 @@ -180,7 +166,8 @@ jobs: - name: Create multi-arch manifest run: | - VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') + VERSION=${RELEASE_TAG##*-} docker buildx imagetools create \ -t $IMAGE_NAME:$VERSION \ From f65f5a07f95ddebcbb751f107fc672152669510b Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Fri, 20 Feb 2026 10:12:55 -0300 Subject: [PATCH 17/19] Remove commented VERSION extraction from build script --- .github/workflows/build-extension.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index c0dc457..d30fc2a 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -82,7 +82,6 @@ jobs: - name: Tag amd64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | - # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') VERSION=${RELEASE_TAG##*-} docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 docker push $IMAGE_NAME:$VERSION-amd64 @@ -140,7 +139,6 @@ jobs: - name: Tag arm64 if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | - # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') VERSION=${RELEASE_TAG##*-} docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 docker push $IMAGE_NAME:$VERSION-arm64 @@ -166,7 +164,6 @@ jobs: - name: Create multi-arch manifest run: | - # VERSION=$(echo "${{ env.RELEASE_TAG }}" | sed 's/^.*-//') VERSION=${RELEASE_TAG##*-} docker buildx imagetools create \ From 4e88cd7453f001645c8ca8b6c1cfee6ace0664c6 Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Fri, 20 Feb 2026 10:26:20 -0300 Subject: [PATCH 18/19] Refactor CI to build for multiple architectures Refactor build process to use a matrix strategy for multiple architectures and consolidate steps for building container images. --- .github/workflows/build-extension.yml | 84 ++++++--------------------- 1 file changed, 19 insertions(+), 65 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index d30fc2a..60243d2 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -29,9 +29,19 @@ jobs: esac echo "##" >> "$GITHUB_OUTPUT" - build-amd64: - name: Build Container Image and Helm Chart - amd64 - runs-on: ubuntu-24.04 + build: + strategy: + matrix: + arch: + - amd64 + - arm64 + include: + - arch: amd64 + runner: ubuntu-24.04 + - arch: arm64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} + name: Build Container Image needs: prepare env: RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} @@ -74,77 +84,21 @@ jobs: run: | yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" - - name: Build and push UI image + - name: Build image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" - - name: Tag amd64 + - name: Tag and Push Image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | VERSION=${RELEASE_TAG##*-} - docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 - docker push $IMAGE_NAME:$VERSION-amd64 - - build-arm64: - name: Build Container Image and Helm Chart - arm64 - runs-on: ubuntu-24.04-arm - needs: prepare - env: - RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Configure Git - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Nodejs with yarn caching - uses: actions/setup-node@v5 - with: - node-version: '20' - cache: yarn - - - name: Enable Corepack - run: corepack enable - - - name: Install dependencies - run: yarn - - - name: Parse Extension Name - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - id: parsed-name - env: - GH_TOKEN: ${{ github.token }} - run: | - yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" - - - name: Build and push UI image - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - run: | - yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" - - - name: Tag arm64 - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} - run: | - VERSION=${RELEASE_TAG##*-} - docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 - docker push $IMAGE_NAME:$VERSION-arm64 + docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-${{ matrix.arch }} + docker push $IMAGE_NAME:$VERSION-${{ matrix.arch }} manifest: - needs: [prepare, build-amd64, build-arm64] + name: Create Container Manifest and Helm Chart + needs: [prepare, build] env: RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} runs-on: ubuntu-latest From eab33e5ab19bec2429196155f8aaa8e217257bde Mon Sep 17 00:00:00 2001 From: Leonardo Miranda Amaral Date: Fri, 20 Feb 2026 10:50:41 -0300 Subject: [PATCH 19/19] fix: Change image owner from 'leooamaral' to 'suse' --- .github/workflows/build-extension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 644d48b..0729130 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -87,7 +87,7 @@ jobs: - name: Build image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} run: | - yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" + yarn publish-pkgs -c -i '' -r ghcr.io -o 'suse' -t "${{ env.RELEASE_TAG }}" - name: Tag and Push Image if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }}