Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cdb5965
inital commit
kpiyush17 Jun 30, 2025
c3d45d6
added ubuntu 24
kpiyush17 Jul 23, 2025
a01cb79
removed sudo
kpiyush17 Jul 25, 2025
d72b5b8
fips rhel ubuntu
kpiyush17 Jul 29, 2025
56b0139
bug fixes
kpiyush17 Aug 4, 2025
ba2da8e
update kairos-init version
abhinavnagaraj Aug 5, 2025
36d3e58
fixed secret flag
kpiyush17 Aug 14, 2025
2b1c211
Update default values in base images workflow
Vivek-Joshi-99 Aug 28, 2025
3ffadcd
Kairos init test arun (#456)
Dr-N00B Oct 28, 2025
90864a8
updating kairos-init version to v0.5.20
Dr-N00B Oct 28, 2025
c6bf39d
minor fixes
Dr-N00B Oct 28, 2025
ff14e8d
updating defaults
Dr-N00B Oct 29, 2025
db8df3b
fix ubuntu OS version without suffix
Dr-N00B Nov 6, 2025
fe963bc
update luet release version
Dr-N00B Nov 6, 2025
0de2677
syncing docker bake with earthfile
Dr-N00B Nov 7, 2025
129b14c
PE-7685: install rsyslog and logrotate in slem (#484)
Dr-N00B Oct 30, 2025
5266492
fix getting opensuse base image
Dr-N00B Nov 13, 2025
8d340bb
Cloud image (#492)
Dr-N00B Nov 17, 2025
633b075
updating alpine tag
Dr-N00B Nov 17, 2025
38fb67f
skipping kernel update for fips
Dr-N00B Nov 17, 2025
e932f5e
refactoring and new make targets
Dr-N00B Nov 18, 2025
1e7e1d2
fix uki image generation
Dr-N00B Nov 18, 2025
7010044
fix for PUSH flag
Dr-N00B Nov 19, 2025
a9ff3a8
bump kairos version to v3.5.8
Dr-N00B Nov 24, 2025
12837cc
bump PE version
Dr-N00B Nov 24, 2025
d220c2a
bump kairos-init version
Dr-N00B Nov 24, 2025
1b26718
bumo kairos version to 3.5.9 and kairos init to 0.5.28
Dr-N00B Nov 25, 2025
254aa2f
Pe 7789 (#500)
Dr-N00B Nov 27, 2025
4d8d04c
fix auroraboot flags
Dr-N00B Dec 2, 2025
41fea3d
Merge branch 'kairos-init' of https://github.com/spectrocloud/CanvOS …
Dr-N00B Dec 2, 2025
50b8278
mount keys and token as secret
Dr-N00B Dec 4, 2025
1d721fc
cmdline fix
Dr-N00B Dec 4, 2025
5983ba9
Merge branch 'main' into kairos-init
Dr-N00B Dec 5, 2025
1d27b0d
refactor and fixes for cloud image
Dr-N00B Dec 9, 2025
8d4994d
fix cloud image targets
Dr-N00B Dec 9, 2025
4690502
refactor base alpine image and iso disk image changes
Dr-N00B Dec 9, 2025
a20bcec
build iso arch fix
Dr-N00B Dec 11, 2025
7745df6
arch fix auroraboot
Dr-N00B Dec 11, 2025
c7cb2b3
revert ubuntu-kairos-base dockerfile
Dr-N00B Dec 11, 2025
ddbc8cf
remove unwanted files
Dr-N00B Dec 11, 2025
a8bf48d
PE-4460: fix
Dr-N00B Dec 11, 2025
3f482f9
Merge branch 'main' into kairos-init
Dr-N00B Jan 5, 2026
699bf2c
Add docker-bake-common.hcl for shared variables and refactor docker-b…
Dr-N00B Feb 9, 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
181 changes: 178 additions & 3 deletions .github/workflows/base-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,186 @@ name: Build Kairos Init Base Images

on:
workflow_dispatch:
inputs:
base_os_image:
description: "Base OS Image"
required: false
type: string
default: ""
kairos_init_image:
description: "Kairos Init Image"
required: false
type: string
default: "quay.io/kairos/kairos-init:v0.5.28"
arch:
description: "Architecture"
required: false
type: choice
options:
- amd64
- arm64
default: "amd64"
model:
description: "Model"
required: false
type: string
default: "generic"
kairos_version:
description: "Kairos Version"
required: false
type: string
default: "v3.5.9"
trusted_boot:
description: "Trusted Boot"
required: false
type: boolean
default: false
registry_prefix:
description: "Registry prefix for output images"
required: false
type: string
default: "us-east1-docker.pkg.dev/spectro-images/dev/pe-6616/edge"

jobs:
generate-matrix:
runs-on: ubuntu-latest
runs-on: Luet-BigRunner
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Generate Matrix
- name: Generate build matrix
id: set-matrix
run: |
echo "Hello"
python3 << 'EOF'
import json
import os

base_os_image = "${{ github.event.inputs.base_os_image }}"
registry_prefix = "${{ github.event.inputs.registry_prefix }}"
arch = "${{ github.event.inputs.arch }}"
model = "${{ github.event.inputs.model }}"
kairos_version = "${{ github.event.inputs.kairos_version }}"
trusted_boot = "${{ github.event.inputs.trusted_boot }}" == "true"

matrix = []

if base_os_image:
# Custom base OS image
simple_name = base_os_image.split('/')[-1].replace(':', '-')
tag = f"{registry_prefix}/kairos-custom:{simple_name}-core-{arch}-{model}-{kairos_version}"
if trusted_boot:
tag += "-uki"

matrix.append({
"base_os": base_os_image,
"tag": tag
})

elif trusted_boot:
# UKI builds - only Ubuntu 24.04
tag = f"{registry_prefix}/kairos-ubuntu:24.04-core-{arch}-{model}-{kairos_version}-uki"
matrix.append({
"base_os": "ubuntu:24.04",
"tag": tag
})

else:
# Standard builds - all combinations
combinations = [
("ubuntu:20.04", "kairos-ubuntu:20.04-core"),
("ubuntu:22.04", "kairos-ubuntu:22.04-core"),
("ubuntu:24.04", "kairos-ubuntu:24.04-core"),
("opensuse/leap:15.6", "kairos-opensuse:leap-15.6-core")
]

for base_os, tag_prefix in combinations:
tag = f"{registry_prefix}/{tag_prefix}-{arch}-{model}-{kairos_version}"
matrix.append({
"base_os": base_os,
"tag": tag
})

matrix_json = json.dumps(matrix)
print(f"Generated matrix: {matrix_json}")

with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f"matrix={matrix_json}\n")
EOF

kairosify:
needs: generate-matrix
runs-on: Luet-BigRunner
strategy:
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to registry
run: echo "${{ secrets.US_EAST_JSON_KEY_B64 }}" | base64 -d | docker login -u _json_key --password-stdin us-east1-docker.pkg.dev

- name: Build and push kairosify image
uses: docker/bake-action@v6
with:
files: docker-bake-kairosify.hcl
targets: kairosify
push: true
set: |
kairosify.platform=linux/${{ github.event.inputs.arch }}
kairosify.args.BASE_OS_IMAGE=${{ matrix.base_os }}
kairosify.args.KAIROS_INIT_IMAGE=${{ github.event.inputs.kairos_init_image }}
kairosify.args.KAIROS_VERSION=${{ github.event.inputs.kairos_version }}
kairosify.args.TRUSTED_BOOT=${{ github.event.inputs.trusted_boot }}
kairosify.args.MODEL=${{ github.event.inputs.model }}
kairosify.tags=${{ matrix.tag }}
env:
DOCKER_BUILD_SUMMARY: false

- name: Save build result
run: |
mkdir -p /tmp/results
echo "${{ matrix.tag }}" >> /tmp/results/built_tags.txt

- name: Upload build results
uses: actions/upload-artifact@v4
with:
name: build-result-${{ strategy.job-index }}-${{ hashFiles('**/matrix.*') }}
path: /tmp/results/built_tags.txt

collect-outputs:
needs: kairosify
runs-on: Luet-BigRunner
outputs:
built_tags: ${{ steps.combine-tags.outputs.tags }}
steps:
- name: Download all build results
uses: actions/download-artifact@v4
with:
pattern: build-result-*
path: /tmp/results

- name: Combine all tags
id: combine-tags
run: |
ALL_TAGS=$(find /tmp/results -name "*.txt" -type f -exec cat {} \; | grep -v '^$' | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "tags=$ALL_TAGS" >> $GITHUB_OUTPUT
echo "All built tags: $ALL_TAGS"

- name: Summary
run: |
echo "## Kairosify Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Input Parameters:**" >> $GITHUB_STEP_SUMMARY
echo "- Base OS Image: ${{ github.event.inputs.base_os_image || 'Default combinations' }}" >> $GITHUB_STEP_SUMMARY
echo "- Kairos Init Image: ${{ github.event.inputs.kairos_init_image }}" >> $GITHUB_STEP_SUMMARY
echo "- Architecture: ${{ github.event.inputs.arch }}" >> $GITHUB_STEP_SUMMARY
echo "- Model: ${{ github.event.inputs.model }}" >> $GITHUB_STEP_SUMMARY
echo "- Kairos Version: ${{ github.event.inputs.kairos_version }}" >> $GITHUB_STEP_SUMMARY
echo "- Trusted Boot: ${{ github.event.inputs.trusted_boot }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Built Images:**" >> $GITHUB_STEP_SUMMARY
echo '${{ steps.combine-tags.outputs.tags }}' | jq -r '.[] | "- " + .' >> $GITHUB_STEP_SUMMARY
15 changes: 0 additions & 15 deletions .github/workflows/pr.yaml

This file was deleted.

Loading