infrastructure/workflows/check-workflows.nix

29 lines
633 B
Nix

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ nix-actions, ... }:
{
name = "Check workflows";
on = {
pull_request.branches = [ "main" ];
push.paths = [ "workflows/*" ];
};
jobs = {
check_workflows = {
runs-on = "nix";
steps = [
(nix-actions.steps.checkout { })
{
name = "Check that the workflows are up to date";
run = nix-actions.lib.nix-shell {
script = "[ $(git status --porcelain | wc -l) -eq 0 ]";
shell = "check-workflows";
};
}
];
};
};
}