-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformat.yaml
33 lines (29 loc) · 981 Bytes
/
format.yaml
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
name: format
on:
pull_request:
push:
branches: main
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: "${{ secrets.CACHIX_CACHE_NAME }}"
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: bootstrap
run: nix profile install "./tools/nix#bootstrap"
- name: treefmt
run: |
just format --fail-on-change --no-cache ||
{
echo "You have not formatted these files: run 'just format' locally!"
echo "Note: For stability -> run it over Nix: 'just develop just format'"
echo "=============================================================="
git diff --name-only
echo "=============================================================="
}