Skip to content

scripts/update-image: Update for variable filenames #18

scripts/update-image: Update for variable filenames

scripts/update-image: Update for variable filenames #18

Workflow file for this run

name: Build
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
image-build:
name: Image build
strategy:
fail-fast: false
timeout-minutes: 15
runs-on:
- self-hosted
- cpu-4
- mem-4G
- disk-100G
- arch-amd64
- image-debian-12
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get install --yes \
debian-archive-keyring \
make \
pipx \
qemu-utils
- name: Setup Incus
run: |
curl https://pkgs.zabbly.com/get/incus-daily | sudo sh
sudo chmod 666 /var/lib/incus/unix.socket
incus admin init --auto
- name: Setup mkosi
run: |
pipx install git+https://github.com/systemd/mkosi.git
- name: Build the image
run: |
export PATH="${PATH}:/root/.local/bin"
(
cat << EOF
#!/bin/sh
echo ${{ github.ref_name }}
EOF
) > mkosi.version
echo "${{ secrets.SB_CERT }}" > mkosi.crt
chmod 644 mkosi.crt
echo "${{ secrets.SB_KEY }}" > mkosi.key
chmod 600 mkosi.key
make
- name: Prepare the files
run: |
mkdir upload
mv mkosi.output/debug.raw upload/
mv mkosi.output/incus.raw upload/
mv "$(ls mkosi.output/IncusOS_*.raw | grep -v usr | grep -v esp | sort | tail -1)" upload/
mv "$(ls mkosi.output/IncusOS_*.efi | sort | tail -1)" upload/
mv "$(ls mkosi.output/IncusOS_*.usr-x86-64.* | sort | tail -1)" upload/
mv "$(ls mkosi.output/IncusOS_*.usr-x86-64-verity.* | sort | tail -1)" upload/
mv "$(ls mkosi.output/IncusOS_*.usr-x86-64-verity-sig.* | sort | tail -1)" upload/
cd upload
for i in *; do
gzip -9 "${i}"
done
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: upload/*
overwrite: true
file_glob: true
release_name: ${{ github.ref_name }}