feat(workflows/pre-commit): Check multiple stages
All checks were successful
Build all the nodes / geo02 (push) Successful in 1m48s
Build all the nodes / compute01 (push) Successful in 2m19s
Build all the nodes / rescue01 (push) Successful in 2m0s
Build all the nodes / storage01 (push) Successful in 1m52s
Build all the nodes / vault01 (push) Successful in 1m47s
Run pre-commit on all files / pre-commit (push) Successful in 35s
Build all the nodes / web02 (push) Successful in 1m30s
Build all the nodes / web01 (push) Successful in 2m18s
Build all the nodes / web03 (push) Successful in 1m30s
Check workflows / check_workflows (push) Successful in 27s
Build all the nodes / ap01 (push) Successful in 1m9s
Build all the nodes / bridge01 (push) Successful in 1m53s
Build all the nodes / geo01 (push) Successful in 1m53s

This commit is contained in:
Tom Hubrecht 2024-12-12 15:01:42 +01:00
parent 88d9b8c3e3
commit f5147dec8d
Signed by: thubrecht
SSH key fingerprint: SHA256:CYNvFo44Ar9qCNnWNnvJVhs0QXO9AZjOLlPeWcSij3Q
2 changed files with 18 additions and 10 deletions

View file

@ -1,9 +1,12 @@
jobs: jobs:
check: pre-commit:
runs-on: nix runs-on: nix
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Run pre-commit on all files - name: Check stage pre-commit
run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage
pre-commit --show-diff-on-failure'
- name: Check stage pre-push
run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage
pre-push --show-diff-on-failure' pre-push --show-diff-on-failure'
name: Run pre-commit on all files name: Run pre-commit on all files

View file

@ -9,14 +9,19 @@
"pull_request" "pull_request"
]; ];
jobs.check = { jobs.pre-commit = {
runs-on = "nix"; runs-on = "nix";
steps = [ steps =
{ uses = "actions/checkout@v3"; } [ { uses = "actions/checkout@v3"; } ]
{ ++ (builtins.map
name = "Run pre-commit on all files"; (stage: {
run = "nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage pre-push --show-diff-on-failure'"; 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"
]
);
}; };
} }