forked from systemd/mkosi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
49 lines (44 loc) · 1.53 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: setup-mkosi
description: Install mkosi and all its dependencies
runs:
using: composite
steps:
- name: Dependencies
shell: bash
run: |
# For archlinux-keyring and pacman
sudo add-apt-repository ppa:michel-slm/kernel-utils
sudo apt-get update
sudo apt-get install --assume-yes --no-install-recommends \
debootstrap \
zypper \
dnf \
pacman-package-manager \
archlinux-keyring \
makepkg \
systemd-container \
qemu-system-x86 \
ovmf \
e2fsprogs \
xfsprogs \
squashfs-tools \
btrfs-progs
sudo pacman-key --init
sudo pacman-key --populate archlinux
# 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 "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 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
- name: Install
shell: bash
run: sudo python3 -m pip install ${{ github.action_path }}