-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (33 loc) · 987 Bytes
/
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 nixos hosts
on:
push:
branches:
- ci
permissions:
contents: write
jobs:
define-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
echo -n "hosts=" && ls hosts | sed -n 's/\.nix$//p' | jq -R | jq -sc >> "$GITHUB_OUTPUT"
echo -n "hosts=" && ls hosts | sed -n 's/\.nix$//p' | jq -R | jq -sc
test:
runs-on: ubuntu-latest
needs: define-matrix
steps:
- run: echo ${{ needs.define-matrix.outputs.hosts }}
build:
runs-on: ubuntu-latest
needs: define-matrix
strategy:
matrix:
host: ${{ fromJSON(needs.define-matrix.outputs.hosts) }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: DeterminateSystems/flake-checker-action@v9
- name: Build NixOS hosts
run: nix develop -c colmena build --on ${{ matrix.host }}