A tiny bit more consistent logging

This commit is contained in:
Domen Kožar 2020-03-14 11:45:44 +01:00
commit e1a832de5b
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
2 changed files with 16 additions and 13 deletions

View file

@ -31,7 +31,7 @@ function run() {
const signingKey = core.getInput('signingKey');
const authToken = core.getInput('authToken');
const cachixExecutable = "/nix/var/nix/profiles/per-user/runner/profile/bin/cachix";
core.startGroup('Installing Cachix');
core.startGroup('Cachix: installing');
yield exec.exec('nix-env', ['-iA', 'cachix', '-f', 'https://cachix.org/api/v1/install']);
core.endGroup();
// for private caches
@ -45,7 +45,10 @@ function run() {
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
}
if (skipNixBuild !== 'true') {
core.startGroup(`Invoking nix-build`);
const args = strings_1.prependEach('-A', strings_1.nonEmptySplit(attributes, /\s+/)).concat([file || "default.nix"]);
const additionalArgs = strings_1.nonEmptySplit(nixBuildArgs, /\s+/);
const allArgs = additionalArgs.concat(args);
core.startGroup(`nix-build {allArgs.join(' ')}`);
if (signingKey !== "") {
// Remember existing store paths
yield exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > store-path-pre-build`]);
@ -58,12 +61,10 @@ function run() {
},
}
};
const args = strings_1.prependEach('-A', strings_1.nonEmptySplit(attributes, /\s+/)).concat([file || "default.nix"]);
const additionalArgs = strings_1.nonEmptySplit(nixBuildArgs, /\s+/);
yield exec.exec('nix-build', additionalArgs.concat(args), options);
yield exec.exec('nix-build', allArgs, options);
core.endGroup();
if (signingKey !== "") {
core.startGroup('Cachix: Pushing paths');
core.startGroup('Cachix: pushing paths');
yield exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' | cat - store-path-pre-build | sort | uniq -u | ${cachixExecutable} push ${name}`]);
core.endGroup();
}