dotfiles-guix/.forgejo/workflows/installer.yaml
Freya Murphy 296103cade
Some checks failed
installer / build (push) Failing after 23m29s
add guix installer workflow
2024-12-19 17:49:33 -05:00

75 lines
1.9 KiB
YAML

# title: install
# desc: generate a guix installer image
# adapted from https://github.com/SystemCrafters/guix-installer/
name: installer
on:
push:
branches:
- main
jobs:
build:
runs-on: docker
container:
image: alpine:3.21
options: "--cap-add=all --privileged" # needed for guix
steps:
- name: Install dependencies
run: |
apk add --no-cache git nodejs util-linux
- name: Git checkout
uses: actions/checkout@v4
- name: Guix cache
uses: actions/cache/restore@v4
with:
path: ~/.cache/guix
key: guix-cache-${{ github.sha }}
restore-keys: |
guix-cache-
- name: Install guix
run: |
SUBSTITUTE_URLS="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org https://substitutes.freya.cat"
apk add --no-cache guix openrc
cat <<EOF > /etc/init.d/guix-daemon
#!/sbin/openrc-run
start(){ guix-daemon --build-users-group=guixbuild --substitute-urls="$SUBSTITUTE_URLS" & }
EOF
chmod +x /etc/init.d/guix-daemon
rc-update add guix-daemon
openrc boot
- name: Setup channels
run: |
export GUIX_RETRY_NO_PROMPT=yes
export GUIX_RETRY_NO_TTY=yes
guix archive --authorize < ./files/keys/nonguix.pub
guix archive --authorize < ./files/keys/sakura.pub
./scripts/guix-retry guix pull -C ./channels.scm
- name: Build ISO
run: |
export GUIX_RETRY_NO_PROMPT=yes
export GUIX_RETRY_NO_TTY=yes
./scripts/build-installer
- name: Guix cache save
uses: actions/cache/save@v4
with:
path: ~/.cache/guix
key: guix-cache-${{ github.sha }}
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: installer
path: guix-installer-*.iso