usimd/pi-gen-action

Build a custom Raspberry Pi image using pi-gen

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
apt-proxyIf you require the use of an apt proxy, set it here. This proxy setting will not be included in the image, making it safe to use an apt-cacher or similar package for development. no""
temp-repoAn additional temporary apt repo to be used during the build process. This could be useful if you require pre-release software to be included in the image. The variable should contain sources in one-line-style format. "RELEASE" will be replaced with the RELEASE variable. (see https://manpages.debian.org/stable/apt/sources.list.5.en.html#ONE-LINE-STYLE_FORMAT) no""
image-nameFinal image name.yes
pi-gen-releaseThe release name to use in `/etc/issue.txt`. The default should only be used for official Raspberry Pi builds.noRaspberry Pi reference
setfcapSetting to `1` will prevent pi-gen from dropping the "capabilities" feature. Generating the root filesystem with capabilities enabled and running it from a filesystem that does not support capabilities (like NFS) can cause issues. Only enable this if you understand what it is. no""
stage-listList of stage name to execute in given order. Relative and absolute paths to custom stage directories are allowed here. Note that by default pi-gen exports images in stage2 (lite), stage4 and stage5. You probably want to hook in custom stages before one of the exported stages. Otherwise, the action will make sure any custom stage will include an image export directive. nostage0 stage1 stage2
releaseThe release version to build images against. Valid values are jessie, stretch, buster, bullseye, bookworm, trixie and testing.notrixie
compressionCompression to apply on final image (either "none", "zip", "xz" or "gz").nozip
compression-levelCompression level to be used. From 0 to 9 (refer to the tool man page for more information on this. Usually 0 is no compression but very fast, up to 9 with the best compression but very slow).no6
localeDefault locale of the system image.noen_GB.UTF-8
hostnameHost name of the image.noraspberrypi
keyboard-keymapDefault keyboard keymap.nogb
keyboard-layoutDefault keyboard layout.noEnglish (UK)
timezoneSystem timezone.noEurope/London
usernameName of the initial user account.nopi
passwordPassword of the intial user account, locked if empty.no
disable-first-boot-user-renameDisable the renaming of the first user during the first boot. This make it so 'username' stays activated. 'username' must be set for this to work. Please be aware of the implied security risk of defining a default username and password for your devices. no0
passwordless-sudoSetting to `1` will enable passwordless sudo for the first user. This allows the user to run commands with sudo without entering a password. Note that this is a security risk and should only be enabled if you understand the implications. The user will still be able to use sudo with a password even when this is set to `0`. 0
wpa-essidSSID of a default wifi network to connect to.no
wpa-passwordPassword of default wifi network to connect to.no
wpa-countryWifi country code of default network to connect to.no
enable-sshEnable SSH access to Pi.no0
pubkey-ssh-first-userSetting this to a value will make that value the contents of the FIRST_USER_NAME's ~/.ssh/authorized_keys. Obviously the value should therefore be a valid authorized_keys file. Note that this does not automatically enable SSH. no
pubkey-only-sshSetting to `1` will disable password authentication for SSH and enable public key authentication. Note that if SSH is not enabled this will take effect when SSH becomes enabled. no0
enable-cloud-initIf set to `1`, cloud-init and netplan will be installed and configured. This will allow you to configure your Raspberry Pi using cloud-init configuration files. The cloud-init configuration files should be placed in the bootfs or by editing the files in `stage2/04-cloud-init/files`. Cloud-init will be configured to read them on first boot. no1
docker-optsAdditional options to include in PIGEN_DOCKER_OPTSno""
pi-gen-repositoryGitHub repository to fetch pi-gen from, must be a fork from RPi-Distro/pi-gen.noRPi-Distro/pi-gen
export-last-stage-onlyIf this feature is enabled, the action will configure pi-gen to not export any stage as image but the last one defined in property 'stage-list'. This is helpful when building a single image flavor (in contrast to building a lite/server and full-blown desktop image), since it speeds up the build process significantly. notrue
pi-gen-versionRelease version of pi-gen to use. This can both be a branch or tag name known in the pi-gen repository.noarm64
enable-noobsSet whether a NOOBS image should be built as well. If enabled, the output directory containing the NOOBS files will be saved as output variable 'image-noobs-path'.nofalse
extra-host-dependenciesComma or whitespace separated list of additional packages to install on host before running pi-gen. Use this list to add any packages your custom stages may require. Note that this is not affecting the final image. In order to add additional packages, you need to add a respective 'XX-packages' file in your custom stage. no""
extra-host-modulesComma or whitespace separated list of additional modules to load on host before running pi-gen. If your custom stage requires additional software or kernel modules to be loaded, add them here. Note that this is not meant to configure modules to be loaded in the target image. no""
increase-runner-disk-sizeEnabling this option will remove plenty of components from the GitHub Actions runner that are not mandatory pre-requisites for a (vanilla) pi-gen build. This shall increase the available disk space so that also large images can be compiled on a free GHA runner (benchmark is the full image including a desktop environment). If any packages are missing during the build consider adding them to the `extra-host-dependencies` list. nofalse
enable-pigen-cacheEnables caching of pi-gen work artifacts to GitHub action cache to speed up repetitive builds.nofalse
cache-read-onlyWhen true, restores caches but never saves them. Use this on feature branches and PRs to benefit from caches created on your default branch without polluting the cache with branch-specific entries. Only effective when 'enable-pigen-cache' is true. nofalse
pi-gen-dirPath where selected pi-gen ref will be checked out to. If the path does not yet exist, it will be created (including its parents).nopi-gen
verbose-outputPrint all output from pi-gen.nofalse
github-tokenToken to use for checking out pi-gen repo.no${{ github.token }}
internal-matrix-contextUsed to access matrix parameters for cache key generation purposes. This is an internal parameter and must not be changed.no${{ toJSON(matrix) }}
namedescription
image-pathPath to the final custom image
image-noobs-pathPath to final noobs image, if enabled