-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1001 Bytes
/
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
name: "Flake Build"
on:
push:
branches:
master
jobs:
build-system:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Substituters
id: substituters
run: |
echo "TRUSTED_PUBLIC_KEYS=$(./nix.sh ci_get trusted-public-keys)" >> "$GITHUB_OUTPUT"
echo "SUBSTITUTERS=$(./nix.sh ci_get trusted-substituters)" >> "$GITHUB_OUTPUT"
- name: "Install Nix"
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
trusted-public-keys = ${{ steps.substituters.outputs.TRUSTED_PUBLIC_KEYS }}
substituters = ${{ steps.substituters.outputs.SUBSTITUTERS }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: "Check Flake"
run: nix develop . --command check
- name: "Build Packages"
run: |
nix develop .#ci --command bash -c "CACHIX_AUTH_TOKEN=${{ secrets.CACHIX_AUTH_TOKEN }} ./nix.sh ci"