add guix installer workflow
Some checks failed
installer / build (push) Failing after 5s

This commit is contained in:
Murphy 2024-12-12 22:53:10 -05:00
parent bd9eab64ec
commit a5d025f36b
Signed by: freya
GPG key ID: 9FBC6FFD6D2DBF17
2 changed files with 46 additions and 1 deletions

View file

@ -0,0 +1,45 @@
# title: install
# desc: generate a guix installer image
# adapted from https://github.com/SystemCrafters/guix-installer/
name: installer
on: [push]
jobs:
build:
runs-on: docker
container:
image: alpine:3.21
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Guix cache
uses: actions/cache@v4
with:
path: ~/.cache/guix
key: guix-cache-${{ github.sha }}
restore-keys: |
guix-cache
- name: Install Guix
run: |
apk add --no-cache guix openrc udev-init-scropts-openrc
cat <<EOF > /etc/init.d/guix-daemon
#!/sbin/openrc-run
start(){ guix-daemon --build-users-group=guixbuild & }
EOF
chmod +x /etc/init.d/guix-daemon
rc-update add guix-daemon
openrc boot
- name: Build ISO
run: |
./scripts/build-installer
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: installer
path: guix-installer-*.iso

View file

@ -3,7 +3,7 @@ retry="$(dirname $0)/guix-retry"
repo="$(realpath "$(dirname $0)/..")"
extra_args=""
if [ ! -d /gnu/store ]; then
if [ -f /usr/local/bin ]; then
# we are likely in a non guix system
# just for building the installer
# make sure to authorize the substitute