Skip to content

Use nix-systems to allow customization of the target platforms #41

Use nix-systems to allow customization of the target platforms

Use nix-systems to allow customization of the target platforms #41

name: Check pre-commit
on:
push:
paths:
# Set this to the directory of the template
- pre-commit/**
- .github/workflows/check-pre-commit.yml
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
with:
path: ./tmp
- run: nix flake new -t ./tmp#pre-commit ./work
- name: Prepare the project
working-directory: work
run: |
git init
git add .
- run: nix develop -L --command pre-commit --version
working-directory: work