-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.25 KB
/
build.yml
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
40
41
42
43
44
name: build configurations
on:
push:
jobs:
eval:
name: eval flake
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.eval.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- name: evaluate configs
id: eval
run: |
names=$(nix eval --json .#nixosConfigurations --apply 'builtins.attrNames')
json=$(echo "$names" | nix run --inputs-from . nixpkgs#jq -- '{include: map({name: .})}')
echo "matrix=$(echo "$json" | nix run --inputs-from . nixpkgs#jq -- -r 'tostring')" >> "$GITHUB_OUTPUT"
build:
needs: eval
strategy:
matrix: ${{ fromJson(needs.eval.outputs.matrix) }}
name: build ${{ matrix.name }}
runs-on: ubuntu-latest # TODO: this will not work if i ever add something that isn't x86_64-linux, but idc for now :3
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- name: setup cachix
uses: cachix/cachix-action@v13
with:
name: uku3lig
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: build
run: nix build -L --fallback .#nixosConfigurations.${{ matrix.name }}.config.system.build.toplevel