-
Notifications
You must be signed in to change notification settings - Fork 113
37 lines (32 loc) · 947 Bytes
/
lint.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
name: Statix Lint
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- 'README.md'
jobs:
lint:
runs-on: ubuntu-latest
outputs:
lint-success: ${{ steps.build-result.outputs.success }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Run statix linter
run: |
echo "Linting Flake..."
if nix run --extra-experimental-features 'nix-command flakes' nixpkgs#statix -- check .; then
echo "success=true" >> $GITHUB_ENV
else
echo "Lint failed, listing flake.lock for debugging:"
cat flake.lock
echo "success=false" >> $GITHUB_ENV
exit 1
fi
- name: Determine lint result
id: build-result
run: echo "success=${{ env.success }}" >> $GITHUB_OUTPUT