-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.04 KB
/
lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Workflow to format + lint the repo
name: Format and lint repository
on:
# Run on any push - we always want the code formatted!
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# only run one job at a time
concurrency:
group: "format"
cancel-in-progress: true
jobs:
run-format:
# jobs which push to the repo all need to be in this concurrency group
concurrency:
group: "pushers"
# needed to push changes if needed
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v29
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Format and lint repository
run: nix fmt
- name: Push changes
continue-on-error: true # if there are no changes to the files, technically this fails
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git push