chore(workflows): Use nix-shell helper
This commit is contained in:
parent
ea9f513459
commit
18137768ae
11 changed files with 38 additions and 9 deletions
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{ nix-actions, ... }:
|
||||
|
||||
{
|
||||
name = "Check workflows";
|
||||
on = {
|
||||
|
@ -13,10 +15,13 @@
|
|||
check_workflows = {
|
||||
runs-on = "nix";
|
||||
steps = [
|
||||
{ uses = "actions/checkout@v3"; }
|
||||
(nix-actions.steps.checkout { })
|
||||
{
|
||||
name = "Check that the workflows are up to date";
|
||||
run = "nix-shell -A check-workflows --run '[ $(git status --porcelain | wc -l) -eq 0 ]'";
|
||||
run = nix-actions.lib.nix-shell {
|
||||
script = "[ $(git status --porcelain | wc -l) -eq 0 ]";
|
||||
shell = "check-workflows";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -23,7 +23,10 @@ in
|
|||
{ uses = "actions/checkout@v3"; }
|
||||
{
|
||||
name = "Build and cache ${node}";
|
||||
run = "nix-shell -A eval-nodes --run cache-node";
|
||||
run = nix-actions.lib.nix-shell {
|
||||
script = "cache-node";
|
||||
shell = "eval-nodes";
|
||||
};
|
||||
env = {
|
||||
STORE_ENDPOINT = "https://tvix-store.dgnum.eu/infra-signing/";
|
||||
STORE_USER = "admin";
|
||||
|
|
|
@ -18,7 +18,10 @@
|
|||
{ uses = "actions/checkout@v3"; }
|
||||
{
|
||||
name = "Build and cache shell";
|
||||
run = ''nix-shell -A eval-shell --run "nix-build-and-cache -A devShell"'';
|
||||
run = nix-actions.lib.nix-shell {
|
||||
script = "nix-build-and-cache -A devShell";
|
||||
shell = "eval-shell";
|
||||
};
|
||||
env = {
|
||||
STORE_ENDPOINT = "https://tvix-store.dgnum.eu/infra-signing/";
|
||||
STORE_USER = "admin";
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{ nix-actions, ... }:
|
||||
|
||||
{
|
||||
name = "Run pre-commit on all files";
|
||||
on = [
|
||||
|
@ -16,7 +18,10 @@
|
|||
++ (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'";
|
||||
run = nix-actions.lib.nix-shell {
|
||||
script = "pre-commit run --all-files --hook-stage ${stage} --show-diff-on-failure";
|
||||
shell = "pre-commit";
|
||||
};
|
||||
})
|
||||
[
|
||||
"pre-commit"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue