2022-10-19 07:10:15 -04:00
|
|
|
name: Setup mkosi
|
|
|
|
description: Install mkosi and all its dependencies
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "Version (commit hash) of mkosi to install."
|
|
|
|
required: true
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "::group::Dependencies"
|
|
|
|
echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install --assume-yes --no-install-recommends \
|
|
|
|
dnf \
|
|
|
|
systemd-container \
|
|
|
|
qemu-system-x86 \
|
|
|
|
ovmf \
|
|
|
|
e2fsprogs \
|
|
|
|
squashfs-tools
|
|
|
|
echo "::endgroup::"
|
2023-01-18 04:15:58 -05:00
|
|
|
|
2022-10-19 07:10:15 -04:00
|
|
|
# Try to eliminate "Failed to dissect image: Connection timed out" errors from nspawn by compiling
|
|
|
|
# systemd-nspawn from v251 from source.
|
|
|
|
- name: Update systemd-nspawn
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ github.action_path }}
|
|
|
|
run: |
|
|
|
|
echo "::group::Update systemd-nspawn"
|
|
|
|
sudo apt-get build-dep systemd
|
|
|
|
git clone https://github.com/systemd/systemd-stable --branch v251.2 --depth=1
|
|
|
|
meson systemd-stable/build systemd-stable
|
|
|
|
ninja -C systemd-stable/build systemd-nspawn
|
|
|
|
sudo ln -svf $PWD/systemd-stable/build/systemd-nspawn $(which systemd-nspawn)
|
|
|
|
systemd-nspawn --version
|
|
|
|
echo "::endgroup::"
|
2023-01-18 04:15:58 -05:00
|
|
|
|
2022-10-19 07:10:15 -04:00
|
|
|
- name: Install
|
|
|
|
shell: bash
|
|
|
|
run: sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@${{ inputs.version }}
|