-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.11 KB
/
check.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
42
43
44
45
46
name: Flake Check
on: [push]
jobs:
flake-check:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: deadnix
- name: Dead Code Analysis
uses: astro/deadnix-action@main
with:
flags: "-eh"
commit_message: "chore: remove dead code"
- name: Install Nix Linting and Formatting Tools
run: nix-env -i statix alejandra -f '<nixpkgs>'
- name: Run Statix Lint
run: statix fix
- name: Run Nix Format
run: nix fmt
- name: Nix Flake Check (Manual)
run: nix flake check --all-systems
- name: Nix Flake Checker
uses: DeterminateSystems/flake-checker-action@v5
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: run auto formatting and linting tools"