This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/.github/workflows/nix-lint.yaml

41 lines
997 B
YAML
Raw Normal View History

2024-04-07 21:09:00 -05:00
---
name: Nix Lint
2024-03-26 05:16:21 -05:00
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
2024-04-07 21:09:00 -05:00
- name: Checkout repository
uses: actions/checkout@v4
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@main
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Install Nix Linting and Formatting Tools
run: nix-env -i statix nixpkgs-fmt -f '<nixpkgs>'
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Run Statix Lint
run: statix fix
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Run Nix Format
run: nix fmt
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Nix Flake Checker
# You may pin to the exact commit or the version.
# uses: DeterminateSystems/flake-checker-action@4b90f9fc724969ff153fe1803460917c84fe00a3
uses: DeterminateSystems/flake-checker-action@v5
2024-03-26 05:16:21 -05:00
2024-04-07 21:09:00 -05:00
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto lint/format