-
Notifications
You must be signed in to change notification settings - Fork 16
30 lines (30 loc) · 854 Bytes
/
Copy pathnix.yaml
File metadata and controls
30 lines (30 loc) · 854 Bytes
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
name: nix
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Install Cache
uses: DeterminateSystems/magic-nix-cache-action@v4
- run: nix flake check
# confirms that the shell works, and that there are no linting errors
- name: lint formatting
run: |
nix develop --command bash -c "find . -name '*.nix' | xargs nixpkgs-fmt"
if ! git diff-index --quiet HEAD --; then
echo "nixpkgs-fmt had changes"
exit 1
fi
# confirms that the build works
- run: nix build .