57 lines
1.2 KiB
YAML
57 lines
1.2 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=SYS_ADMIN --cap-add=NET_ADMIN" # needed for guix
|
||
|
|
||
|
steps:
|
||
|
- name: Install dependencies
|
||
|
run: |
|
||
|
apk add --no-cache git nodejs
|
||
|
|
||
|
- name: Git checkout
|
||
|
uses: actions/checkout@v4
|
||
|
|
||
|
- name: Guix cache
|
||
|
id: guix-cache
|
||
|
uses: actions/cache@v4
|
||
|
with:
|
||
|
path: ~/.cache/guix
|
||
|
key: ${{ runner.os }}-guix-cache
|
||
|
|
||
|
- name: Install guix
|
||
|
run: |
|
||
|
apk add --no-cache guix 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
|