-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.26 KB
/
darwin-rebuild.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
40
41
42
43
name: "Darwin Rebuild"
on:
pull_request:
paths-ignore:
- nixos-*/**
push:
branches:
- main
jobs:
darwin-rebuild:
strategy:
matrix:
host:
- Fox
- Petere-MBP
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: cachix/cachix-action@v15
with:
name: esselius
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- name: Evaluate darwin config
id: drv-check
run: |
echo -n result= >> $GITHUB_OUTPUT
nix --accept-flake-config path-info --derivation .#darwinConfigurations.${{ matrix.host }}.config.system.build.toplevel | base64 | tee /tmp/drv >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: cache-test
with:
path: /tmp/drv
key: darwin-${{ hashFiles(format('{0}/{1}.{2}', 'darwin-configurations', matrix.host, 'nix')) }}-${{ steps.drv-check.outputs.result }}
lookup-only: true
- name: Build darwin config
if: steps.cache-test.outputs.cache-hit != 'true'
run: nix --accept-flake-config build .#darwinConfigurations.${{ matrix.host }}.config.system.build.toplevel