feat(reuse): Switch to an action rather than a git hook, to be less cumbersome
All checks were successful
Check meta / check_dns (pull_request) Successful in 16s
Check meta / check_meta (pull_request) Successful in 16s
Check workflows / check_workflows (push) Successful in 17s
Check workflows / check_workflows (pull_request) Successful in 16s
Build all the nodes / ap01 (pull_request) Successful in 32s
Run pre-commit on all files / pre-commit (push) Successful in 36s
Build all the nodes / netcore02 (pull_request) Successful in 20s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m49s
Build all the nodes / bridge01 (pull_request) Successful in 1m50s
Build all the nodes / vault01 (pull_request) Successful in 1m48s
Run pre-commit on all files / pre-commit (pull_request) Successful in 27s
Build the shell / build-shell (pull_request) Successful in 43s
Build all the nodes / hypervisor02 (pull_request) Successful in 3m5s
Build all the nodes / hypervisor03 (pull_request) Successful in 3m10s
Build all the nodes / build01 (pull_request) Successful in 3m27s
Build all the nodes / web02 (pull_request) Successful in 1m48s
Build all the nodes / web03 (pull_request) Successful in 1m53s
Build all the nodes / geo01 (pull_request) Successful in 3m54s
Build all the nodes / compute01 (pull_request) Successful in 4m2s
Build all the nodes / storage01 (pull_request) Successful in 3m46s
Build all the nodes / geo02 (pull_request) Successful in 4m2s
Build all the nodes / rescue01 (pull_request) Successful in 3m54s
Build all the nodes / tower01 (pull_request) Successful in 3m57s
Build all the nodes / web01 (pull_request) Successful in 4m36s

This commit is contained in:
Tom Hubrecht 2025-01-16 14:28:40 +01:00
parent fa2aefdb9a
commit 44997e3b2c
Signed by: thubrecht
SSH key fingerprint: SHA256:CYNvFo44Ar9qCNnWNnvJVhs0QXO9AZjOLlPeWcSij3Q
3 changed files with 42 additions and 6 deletions

View file

@ -0,0 +1,13 @@
###
# This file was automatically generated with nix-actions.
jobs:
pre-commit:
runs-on: nix
steps:
- uses: actions/checkout@v3
- name: REUSE lint
run: nix-shell -A reuse-check --run 'reuse lint'
name: Run pre-commit on all files
on:
- push
- pull_request

View file

@ -44,12 +44,6 @@ let
package = pkgs.nixfmt-rfc-style;
};
reuse = nix-reuse.hook {
enable = true;
stages = [ "pre-push" ];
package = pkgs.reuse; # git-hooks.nix is lagging on nixpkgs update
};
commitizen.enable = true;
};
};
@ -185,6 +179,7 @@ in
src = sources.nixos-generators;
}))
pkgs.npins
pkgs.reuse
# SSO testing
pkgs.kanidm
@ -216,6 +211,7 @@ in
check-workflows.shellHook = workflows.shellHook;
eval-nodes.packages = [ scripts.cache-node ];
eval-shell.packages = [ scripts.nix-build-and-cache ];
reuse-check.packages = [ pkgs.reuse ];
};
};
}

27
workflows/reuse-check.nix Normal file
View file

@ -0,0 +1,27 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ nix-actions, ... }:
{
name = "Run pre-commit on all files";
on = [
"push"
"pull_request"
];
jobs.pre-commit = {
runs-on = "nix";
steps = [
{ uses = "actions/checkout@v3"; }
{
name = "REUSE lint";
run = nix-actions.lib.nix-shell {
script = "reuse lint";
shell = "reuse-check";
};
}
];
};
}