Skip to content

Build Kata OS for amd64 #15

Build Kata OS for amd64

Build Kata OS for amd64 #15

Workflow file for this run

name: Build Kata OS for amd64
run-name: Build Kata OS for amd64
on: [push]
env:
KERNEL_VERSION: 6.8
jobs:
build-os-amd64:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libelf-dev flex bison
- name: Build Ubuntu 22.04 image
run: cd tools/osbuilder && sudo make USE_DOCKER=true image-ubuntu
- name: Build Kernel $KERNEL_VERSION
run: |
cd tools/packaging/kernel
sudo ./build-kernel.sh -v $KERNEL_VERSION setup
sudo ./build-kernel.sh -v $KERNEL_VERSION build
- name: Bundle artifacts
run: |
cp tools/packaging/kernel/kata-linux-*/vmlinux /tmp/vmlinux
cp tools/osbuilder/kata-containers-image-ubuntu.img /tmp/kata-containers-image-ubuntu.img
cp sbom.json /tmp/sbom.json
zip -j artifacts.zip /tmp/vmlinux /tmp/kata-containers-image-ubuntu.img /tmp/sbom.json
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts.zip
retention-days: 1
# Only create a release when a new tag is created
- name: 'Create New Release'
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
echo "Creating release $tag"
gh release create $tag -t $tag -a artifacts.zip