Skip to content

add nix format check #8

add nix format check

add nix format check #8

Workflow file for this run

name: "Flake Check"
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
prepare:
name: Find Checks πŸ”
runs-on: ubuntu-latest
outputs:
checks: ${{ steps.checks.outputs.checks }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix ❄️
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flake-checker-action@main
- name: Find Checks πŸ”
id: checks
run: |
nix-instantiate --json --eval --strict -E 'with builtins; attrNames (getFlake (toString ./.)).checks.${currentSystem}' | perl -pe 's|(.*)|checks=\1|' >>$GITHUB_OUTPUT
checks:
name: Check πŸ“‹
needs:
- prepare
strategy:
fail-fast: false
matrix:
check: ${{ fromJSON(needs.prepare.outputs.checks) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run Check πŸ“‹
run: |
nix build -L --impure --expr "with builtins; (getFlake (toString ./.)).checks.\${currentSystem}.${{ matrix.check }}"