Skip to content

Commit

Permalink
add alejandra workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanvir committed Oct 13, 2023
1 parent fcadebd commit 5021c9d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/alejandra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint With Alejandra
on:
push:
paths:
- "**.nix"
workflow_dispatch:

jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check Out Repository
uses: actions/checkout@v3
- name: Set Up Nix
uses: cachix/install-nix-action@master
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Format code with alejandra
uses: workflow/nix-shell-action@v3
with:
packages: alejandra
script: |
alejandra .
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: linting with Alejandra"

0 comments on commit 5021c9d

Please sign in to comment.