Skip to content

Commit f5e6e94

Browse files
committed
perf: skip substituter checks for trivial workflow builders
Use runCommandLocal instead of runCommand for the YAML generation and workflow directory derivations, avoiding slow binary cache lookups for builds that complete instantly locally.
1 parent dbd7b9a commit f5e6e94

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/github-ci.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ in {
8484
lib.mapAttrs' (
8585
name: workflow:
8686
lib.nameValuePair "${name}.yml" (
87-
pkgs.runCommand "${name}.yml" {
87+
pkgs.runCommandLocal "${name}.yml" {
8888
nativeBuildInputs = [pkgs.yq-go];
8989
json = builtins.toJSON (workflowToYaml workflow);
9090
passAsFile = ["json"];
@@ -103,7 +103,7 @@ in {
103103

104104
githubActions.workflowsDir = lib.mkIf cfg.enable (
105105
# Create a directory with all workflow files
106-
pkgs.runCommand "github-workflows" {} ''
106+
pkgs.runCommandLocal "github-workflows" {} ''
107107
mkdir -p $out
108108
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: file: ''
109109
cp ${file} $out/${name}

0 commit comments

Comments
 (0)