-
-
Notifications
You must be signed in to change notification settings - Fork 37
39 lines (33 loc) · 1.03 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "Build NH"
on:
pull_request:
push:
branches-ignore:
- 'update-*'
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Install Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build github:$GITHUB_REPOSITORY/$GITHUB_SHA -L
# TODO: use the nixpkgs NixOS module or move test to nixpkgs
# TODO: use unshare instead of sudo to mount
# - name: NixOS check
# env:
# out: /nixos
# run: |
# sudo /bin/bash <<EOF
# source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
# mkdir -pv $out
# mount -t tmpfs none $out
# nix profile install nixpkgs#nixos-install-tools
# nixos-install \
# --flake github:$GITHUB_REPOSITORY/$GITHUB_SHA#check \
# --root $out \
# --no-root-passwd \
# --no-bootloader
# EOF