Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

setup-mkosi

v6

setup-mkosi

play

setup-mkosi

Install mkosi

Installation

Copy and paste the following snippet into your .yml file.

              

- name: setup-mkosi

uses: systemd/mkosi@v6

Learn more about this action in systemd/mkosi

Choose a version

mkosi - Create legacy-free OS images

A fancy wrapper around dnf --installroot, debootstrap, pacstrap and zypper that may generate disk images with a number of bells and whistles.

For a longer description and available features and options, see the man page.

Installation

Installing mkosi is easy, as it has no runtime Python dependencies (you will need all the tools to format filesystems and bootstrap the distribution appropriate for your image, though).

If you just want the current master branch you can run

python3 -m pip install --user git+https://github.com/systemd/mkosi.git

If you want to hack on mkosi do

# clone either this repository or your fork of it
git clone https://github.com/systemd/mkosi/
cd mkosi
python3 -m pip install --user --editable .

This will install mkosi in editable mode to ~/.local/bin/mkosi, allowing you to use your own changes right away.

For development you optionally also need mypy and pytest. We check tests and typing in CI (see .github/workflows), but you can run the tests locally as well.

zipapp

You can also package mkosi as a zipapp that you can deploy anywhere in your PATH. Running this will leave a mkosi binary in builddir/

tools/generate_zipapp.sh

Python module

Besides the mkosi binary, you can also call mkosi via

python -m mkosi

when not installed as a zipapp.

Please note, that the the python module exists solely for the usage of the mkosi binary and is not to be considered a public API.

References