Skip to content

Commit

Permalink
feat: Install Nix on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
redyf committed Jan 9, 2024
1 parent 6bdefa6 commit 546d599
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/flake_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Nix Flake Check

on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- 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 nixpkgs-fmt -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:
commit_message: Auto lint/format
branch: dev

0 comments on commit 546d599

Please sign in to comment.