Skip to content
Merged
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
be5b716
Enhance workflow for multi-arch builds and registry
leooamaral Feb 18, 2026
3d4179b
Enhance multi-arch manifest creation in workflow
leooamaral Feb 18, 2026
97db78c
Replace docker manifest commands with buildx imagetools
leooamaral Feb 18, 2026
0738267
Update image reference in Chart.yaml
leooamaral Feb 19, 2026
6893b5c
Update image reference in Chart.yaml
leooamaral Feb 19, 2026
ecddf88
Change image repository to leooamaral/suse-ai-lifecycle-manager
leooamaral Feb 19, 2026
65b76ae
Update image repository for SUSE AI Lifecycle Manager
leooamaral Feb 19, 2026
a298bfb
Update image reference in Chart.yaml
leooamaral Feb 19, 2026
c410981
Update values.yaml
leooamaral Feb 19, 2026
afe4eb1
Update image reference in Chart.yaml
leooamaral Feb 19, 2026
312c4fc
Update chart registry and image name in workflow
leooamaral Feb 19, 2026
0e6cc27
fix: add tag calculation in last extension job
leooamaral Feb 19, 2026
be44abf
Add tag calculation step to build workflow
leooamaral Feb 19, 2026
e3c11b3
Add RELEASE_TAG environment variable for tagging
leooamaral Feb 19, 2026
a8a7c76
Merge pull request #7 from leooamaral/main
leooamaral Feb 19, 2026
4b172e0
Refactor GitHub Actions workflow for image builds
leooamaral Feb 19, 2026
74537c8
Refactor UI image build process in workflow
leooamaral Feb 20, 2026
f65f5a0
Remove commented VERSION extraction from build script
leooamaral Feb 20, 2026
4e88cd7
Refactor CI to build for multiple architectures
leooamaral Feb 20, 2026
922bd07
Merge branch 'feat/add-arm-lifecycle' into main
leooamaral Feb 20, 2026
2911c5b
Merge pull request #8 from leooamaral/main
leooamaral Feb 20, 2026
eab33e5
fix: Change image owner from 'leooamaral' to 'suse'
leooamaral Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 116 additions & 10 deletions .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
@@ -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
IMAGE_NAME: ghcr.io/suse/suse-ai-lifecycle-manager

jobs:
build-extension:
name: Build Container Image and Helm Chart
runs-on: ubuntu-latest
build-amd64:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having build-amd64, build-arm64 can we do something like this?
https://github.com/rancher-sandbox/rancher-desktop-rdx-open-webui/blob/main/.github/workflows/build.yaml#L26

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this is not supported.

Since the Rancher packaging script (yarn publish-pkgs) does not support specifying a target platform (e.g. --platform linux/amd64,linux/arm64), it is not possible to build a multi-arch image in a single step using docker buildx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I made some changes to remove code duplication and use matrix job

name: Build Container Image and Helm Chart - amd64
runs-on: ubuntu-24.04
permissions:
actions: write
contents: read
packages: write
steps:
Expand All @@ -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 'suse')

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]'
Expand All @@ -55,6 +131,9 @@ jobs:
node-version: '20'
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn

Expand All @@ -72,27 +151,54 @@ 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 'suse')

if [[ -n "${{ env.RELEASE_TAG }}" ]]; then
publish+=(-t "$RELEASE_TAG")
fi

"${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/^.*-//')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason VERSION is extracted from git ref here whereas VERSION is extracted from package.json at other places in the workflow?

Copy link
Contributor Author

@leooamaral leooamaral Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I see that there are places where the version is coming from the git tag and another is coming from package.json, so I will change the pipeline to follow a common place


docker buildx imagetools create \
-t $IMAGE_NAME:$VERSION \
$IMAGE_NAME:$VERSION-amd64 \
$IMAGE_NAME:$VERSION-arm64

- 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