constellation/.github/actions/setup_mkosi/action.yaml
renovate[bot] a8101c8c64
deps: update GitHub action dependencies (#1745)
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-05-05 14:42:20 +02:00

68 lines
2.0 KiB
YAML

name: Setup mkosi
description: Install mkosi and all its dependencies
inputs:
version:
description: "Version (commit hash) of mkosi to install."
required: true
systemdVersion:
description: "Version (commit hash) of systemd 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 \
bubblewrap \
dnf \
e2fsprogs \
libfdisk-dev \
mtools \
ovmf \
python3-pefile \
python3-pyelftools \
python3-setuptools \
qemu-system-x86 \
squashfs-tools \
systemd-container
echo "::endgroup::"
- name: Checkout systemd
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: systemd/systemd
path: ${{ github.action_path }}/systemd
ref: ${{ inputs.systemdVersion }}
- name: Update systemd tools
shell: bash
working-directory: ${{ github.action_path }}
run: |
echo "::group::Update systemd tools"
sudo apt-get build-dep systemd
meson systemd/build systemd -Drepart=true -Defi=true -Dbootloader=true
BINARIES=(
bootctl
systemctl
systemd-analyze
systemd-dissect
systemd-nspawn
systemd-repart
ukify
)
ninja -C systemd/build ${BINARIES[@]}
for BINARY in "${BINARIES[@]}"; do
sudo ln -svf $PWD/systemd/build/$BINARY /usr/bin/$BINARY
done
echo "::endgroup::"
- name: Install
shell: bash
run: sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@${{ inputs.version }}