File tree Expand file tree Collapse file tree 4 files changed +67
-17
lines changed
Expand file tree Collapse file tree 4 files changed +67
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Nix Flake actions
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ nix-matrix :
11+ runs-on : ubuntu-latest
12+ outputs :
13+ matrix : ${{ steps.set-matrix.outputs.matrix }}
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : cachix/install-nix-action@v30
17+ - id : set-matrix
18+ name : Generate Nix Matrix
19+ run : |
20+ set -Eeu
21+ matrix="$(nix eval --json '.#githubActions.matrix')"
22+ echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
23+
24+ nix-build :
25+ name : ${{ matrix.name }} (${{ matrix.system }})
26+ needs : nix-matrix
27+ runs-on : ${{ matrix.os }}
28+ strategy :
29+ matrix : ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
30+ steps :
31+ - uses : actions/checkout@v4
32+ - uses : cachix/install-nix-action@v30
33+ - uses : cachix/cachix-action@v15
34+ with :
35+ name : kidibox
36+ authToken : " ${{ secrets.CACHIX_AUTH_TOKEN }}"
37+ - run : nix build -L '.#${{ matrix.attr }}'
Original file line number Diff line number Diff line change 3333 pre-commit-hooks-nix . url = "github:cachix/pre-commit-hooks.nix" ;
3434 pre-commit-hooks-nix . inputs . nixpkgs . follows = "nixpkgs" ;
3535
36+ nix-github-actions . url = "github:nix-community/nix-github-actions" ;
37+ nix-github-actions . inputs . nixpkgs . follows = "nixpkgs" ;
38+
3639 stylix = {
3740 url = "github:danth/stylix" ;
3841 inputs = {
7275
7376 outputs =
7477 inputs @{ self , ... } :
75- inputs . snowfall-lib . mkFlake {
78+ ( inputs . snowfall-lib . mkFlake {
7679 inherit self inputs ;
7780
7881 src = ./. ;
9497 outputs-builder = channels : {
9598 formatter = inputs . treefmt-nix . lib . mkWrapper channels . nixpkgs ./treefmt.nix ;
9699 } ;
100+ } )
101+ // {
102+ githubActions = inputs . nix-github-actions . lib . mkGithubMatrix {
103+ checks = inputs . nixpkgs . lib . getAttrs [ "x86_64-linux" "x86_64-darwin" ] self . checks ;
104+ } ;
97105 } ;
98106}
You can’t perform that action at this time.
0 commit comments