diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 0000000..1856003 --- /dev/null +++ b/.github/workflows/format.yaml @@ -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