chore: add ci job to ensure formatting is correct
This commit is contained in:
parent
9fed9a669f
commit
cd8433cd45
1 changed files with 24 additions and 0 deletions
24
.github/workflows/format.yaml
vendored
Normal file
24
.github/workflows/format.yaml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: "format"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Setup Caching
|
||||||
|
uses: cachix/cachix-action@v16
|
||||||
|
with:
|
||||||
|
name: selfhostblocks
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Check Formatting
|
||||||
|
run: |
|
||||||
|
find . -name '*.nix' | nix fmt -- --ci
|
||||||
Loading…
Reference in a new issue