Caution
This Action is in early development and with the help of AI, wait until a stable release before relying on it's API
Build Kairos immutable images and artifacts within your release pipeline with ease. This GitHub Action simplifies the process of creating Kairos container images and bootable formats (ISO, RAW, VHD, etc.) for various platforms and architectures.
- Multi-platform support: Build for
amd64
andarm64
architectures - Multiple base images: Support for Ubuntu, OpenSUSE, and other distributions
- Kubernetes integration: Built-in support for K3s and K0s distributions
- Artifact generation: Create ISO, RAW, VHD, GCE, and TAR artifacts
- Security scanning: Integrated Grype and Trivy vulnerability scanning
- Digital signing: Cosign integration for artifact signing
- Trusted boot: Support for UKI (Unified Kernel Image) builds
- Flexible versioning: Automatic git-based versioning or manual semver
- Registry publishing: Push to any container registry
- GitHub Summary: Rich build summaries with artifact links
This repository provides a reusable workflow for building Kairos images with excellent GitHub UI visibility and comprehensive functionality.
Use the reusable workflow for building Kairos images:
jobs:
build:
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@main
with:
version: "v1.0.0"
iso: true
summary_artifacts: true
push_repository: "ghcr.io/user/repo"
push_repository_username: ${{ secrets.GITHUB_TOKEN }}
push_repository_password: ${{ secrets.GITHUB_TOKEN }}
Benefits:
- β Expanded step visibility in GitHub UI
- β Boolean inputs for individual artifact types and security checks
- β Simplified configuration
- β Self-contained logic with no external dependencies
- name: Build Kairos image
uses: kairos-io/kairos-factory-action@v1
with:
version: "1.0.0"
base_image: "ubuntu:24.04"
model: "generic"
artifacts: "iso"
summary_artifacts: true
- name: Build Kairos with K3s
uses: kairos-io/kairos-factory-action@v1
with:
version: "auto"
base_image: "ubuntu:24.04"
kubernetes_distro: "k3s"
kubernetes_version: "v1.28.0"
artifacts: "iso,raw"
security_checks: "grype,trivy"
sign_artifacts: true
This action follows a dual-structure pattern that provides flexibility for different use cases:
Use the reusable workflow for better GitHub UI visibility and simpler configuration:
jobs:
build:
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@main
with:
version: "v1.0.0"
iso: true
summary_artifacts: true
push_repository: "ghcr.io/user/repo"
push_repository_username: ${{ secrets.GITHUB_TOKEN }}
push_repository_password: ${{ secrets.GITHUB_TOKEN }}
**Benefits:**
- β
Expanded step visibility in GitHub UI
- β
Marketplace publishing support
- β
Boolean inputs for individual artifact types and security checks
- β
Simplified configuration
### Option 2: Composite Action (Advanced Use Cases)
Use the composite action directly for maximum control:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: kairos-io/kairos-factory-action@v1
with:
version: "v1.0.0"
artifacts: "iso,raw"
security_checks: "grype,trivy"
sign_artifacts: true
Benefits:
- β Direct control over all inputs
- β Comma-separated lists for artifacts and security checks
- β Advanced customization options
Both approaches support the same functionality. The reusable workflow automatically converts boolean inputs to the appropriate format for the composite action:
Reusable Workflow | Composite Action | Description |
---|---|---|
iso: true |
artifacts: "iso" |
Generate ISO artifact |
raw: true, iso: true |
artifacts: "iso,raw" |
Generate multiple artifacts |
cosign: true |
sign_artifacts: true |
Sign artifacts with cosign |
grype: true |
security_checks: "grype" |
Run Grype security scan |
Input | Description | Required | Default |
---|---|---|---|
dockerfile_path |
Path to the Dockerfile to use for building | β | images/Dockerfile |
Input | Description | Required | Default |
---|---|---|---|
version |
Version for the build (semver or "auto" for git describe) | β | - |
base_image |
Base image to use (e.g., ubuntu:24.04, opensuse/leap:15.6) | β | ubuntu:24.04 |
model |
Target model (generic, rpi3, nvidia-jetson-agx-orin) | β | generic |
arch |
Target architecture (amd64, arm64) | β | amd64 |
kubernetes_distro |
Kubernetes distribution (k3s, k0s) | β | - |
kubernetes_version |
Kubernetes version (auto or specific version) | β | auto |
trusted_boot |
Enable trusted boot support | β | false |
Input | Description | Required | Default |
---|---|---|---|
artifacts |
Comma-separated artifacts (iso,raw,vhd,gce,tar) | β | iso |
output_format |
Output format override (auto, docker, oci) | β | auto |
Input | Description | Required | Default |
---|---|---|---|
security_checks |
Comma-separated checks (cosign,grype,trivy) | β | - |
sign_artifacts |
Sign generated artifacts with cosign | β | false |
Input | Description | Required | Default |
---|---|---|---|
push_repository |
Repository to push to (e.g., ghcr.io/user/repo) | β | - |
push_repository_username |
Username for authentication | β | - |
push_repository_password |
Password/token for authentication | β | - |
Input | Description | Required | Default |
---|---|---|---|
summary_artifacts |
Add artifact links to GitHub Summary | β | false |
auroraboot_version |
Auroraboot version to use | β | latest |
Output | Description |
---|---|
image_tag |
The generated image tag |
artifacts |
JSON array of generated artifacts |
summary |
Build summary for GitHub Summary |
jobs:
build:
uses: kairos-io/kairos-factory-action/.github/workflows/build-factory.yaml@main
with:
version: "1.0.0"
base_image: "ubuntu:24.04"
model: "generic"
iso: true
summary_artifacts: true
# Use this when you have a custom Dockerfile path
jobs:
build:
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@main
with:
dockerfile_path: "custom/path/Dockerfile" # Custom Dockerfile location
version: "auto"
base_image: "ubuntu:24.04"
model: "generic"
arch: "amd64"
iso: true
raw: true
summary_artifacts: true
jobs:
build:
strategy:
matrix:
arch: [amd64, arm64]
uses: kairos-io/kairos-factory-action/.github/workflows/reusable-factory.yaml@main
with:
version: "auto"
arch: ${{ matrix.arch }}
kubernetes_distro: "k3s"
iso: true
push_repository: "ghcr.io/${{ github.repository }}"
push_repository_username: ${{ github.actor }}
push_repository_password: ${{ secrets.GITHUB_TOKEN }}
### Specialized Models
```yaml
# Raspberry Pi
- uses: kairos-io/kairos-factory-action@v1
with:
version: "auto"
model: "rpi3"
arch: "arm64"
kubernetes_distro: "k3s"
# NVIDIA Jetson
- uses: kairos-io/kairos-factory-action@v1
with:
version: "auto"
model: "nvidia-jetson-agx-orin"
arch: "arm64"
artifacts: "raw"
- uses: kairos-io/kairos-factory-action@v1
with:
version: "auto"
kubernetes_distro: "k3s"
security_checks: "grype,trivy"
sign_artifacts: true
trusted_boot: true
- generic: Standard x86_64/ARM64 builds
- rpi3: Raspberry Pi 3/4 builds
- nvidia-jetson-agx-orin: NVIDIA Jetson AGX Orin builds
- iso: Bootable ISO images (generic model only)
- raw: Raw disk images (most models except rpi3, generic, nvidia-jetson)
- vhd: Virtual Hard Disk images (coming soon)
- gce: Google Compute Engine images (coming soon)
- tar: TAR archives (coming soon)
- Grype scanning: Anchore's vulnerability scanner
- Trivy scanning: Aqua Security's comprehensive scanner
- Cosign signing: Sigstore's digital signing
- Trusted boot: UKI support for secure boot
For more detailed information about Kairos, visit:
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with β€οΈ by the Kairos Community