chore: add ci job to ensure formatting is correct

This commit is contained in:
ibizaman 2025-10-28 21:24:52 +01:00 committed by Pierre Penninckx
parent 48802553de
commit d0a4172575

24
.github/workflows/format.yaml vendored Normal file
View 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