chore: update flakes (#776) #276
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Format | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "release-*" | |
| workflow_dispatch: | |
| jobs: | |
| nix: | |
| name: Nix files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.PUSH_TOKEN }} | |
| - name: Set Git user info | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Get short revision | |
| id: rev | |
| run: echo "rev=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| - name: Format Nix files | |
| run: | | |
| nix fmt | |
| - name: Install Node modules | |
| run: | | |
| nix develop --command pnpm install | |
| - name: Format with Prettier | |
| run: | | |
| nix develop --command nrr fmt | |
| - name: Commit changes | |
| run: | | |
| if ! git diff --color=always --exit-code; then | |
| git commit -am "style: format ${{ steps.rev.outputs.rev }}" | |
| git push | |
| fi |