github: add automatic format check

This commit is contained in:
Aly Raffauf 2024-06-11 14:32:04 -04:00
parent 0831fdaeb9
commit 124f70e722
3 changed files with 25 additions and 5 deletions

View file

@ -1,4 +1,4 @@
name: Check flake name: "flake: evaluation check"
on: on:
push: push:

20
.github/workflows/check-fmt.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: "flake: format check"
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v20
- name: Check if flake.nix successfully evaluates
run: nix fmt -- -c .

View file

@ -1,4 +1,4 @@
name: Bump flake.lock name: "flake.lock: update"
on: on:
schedule: schedule:
@ -17,15 +17,15 @@ jobs:
- uses: cachix/install-nix-action@v20 - uses: cachix/install-nix-action@v20
- name: Update inputs in flake.nix - name: Update inputs in flake.lock
run: nix flake update run: nix flake update
- name: Check if flake.nix still evaluates - name: Check if flake still evaluates
run: nix flake check run: nix flake check
- uses: stefanzweifel/git-auto-commit-action@v5 - uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: Bump flake.lock commit_message: "flake.lock: update"
branch: master branch: master
commit_options: '--no-verify --signoff' commit_options: '--no-verify --signoff'
file_pattern: flake.lock file_pattern: flake.lock