# SPDX-FileCopyrightText: 2024 Tom Hubrecht # # SPDX-License-Identifier: EUPL-1.2 { name = "Run pre-commit on all files"; on = [ "push" "pull_request" ]; jobs.pre-commit = { runs-on = "nix"; steps = [ { uses = "actions/checkout@v3"; } ] ++ (builtins.map (stage: { name = "Check stage ${stage}"; run = "nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage ${stage} --show-diff-on-failure'"; }) [ "pre-commit" "pre-push" ] ); }; }