-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (34 loc) · 998 Bytes
/
check-regen-nix.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
38
39
40
41
name: check nix regeneration
on:
pull_request:
branches:
- main
jobs:
build:
name: Check nix regeneration
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Set up cachix
uses: cachix/cachix-action@v14
with:
name: cabal-audit
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: regenerate nix
run: |
nix run nixpkgs#cabal-install -- update
export PRJ_ROOT=./.
nix -Lv run .#regen-nix
- name: check for git changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "Uncommitted changes found after running the regen-nix"
echo "please run regen-nix or nix run .#regen-nix locally"
git diff
exit 1
else
echo "No changes found after running the tool."
fi