Skip to content

Commit

Permalink
✨ github: new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Feb 25, 2024
1 parent a6a0454 commit ceb2f43
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
name: Nix Flake Check

on: [push, pull_request, workflow_dispatch]
on: [push]

jobs:
checks:
name: Check expressions
check:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v24

with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Install Nix Linting and Formatting Tools
run: nix-env -i statix nixfmt -f '<nixpkgs>'

- name: Run Statix Lint
run: statix fix

- name: Run Nix Format
run: nix fmt

- name: Nix Flake Checker
uses: DeterminateSystems/flake-checker-action@v5

- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
install_url: https://nixos.org/nix/install
extra_nix_config: |
auto-optimise-store = true
experimental-features = nix-command flakes
access-tokens = ${{ secrets.AUTH_TOKEN }}
- run: nix flake check
commit_message: Auto lint/format
branch: dev

0 comments on commit ceb2f43

Please sign in to comment.