diff --git a/code-build.js b/code-build.js index bdd8ca4..00e2176 100644 --- a/code-build.js +++ b/code-build.js @@ -57,6 +57,7 @@ async function build(sdk, params, config) { branch: params.branch, sourceVersion: params.sourceVersion, reproducible: params.reproducible, + useNix: params.useNix, gpSshPrivateKeyB64: params.gpSshPrivateKeyB64, imageTag, }), @@ -101,15 +102,15 @@ async function waitForBuildEndTime( }) ), !hideCloudWatchLogs && - logGroupName && - cloudWatchLogs.send( - new GetLogEventsCommand({ - logGroupName, - logStreamName, - startFromHead, - nextToken, - }) - ), + logGroupName && + cloudWatchLogs.send( + new GetLogEventsCommand({ + logGroupName, + logStreamName, + startFromHead, + nextToken, + }) + ), ]).catch((err) => { errObject = err; /* Returning [] here so that the assignment above @@ -206,9 +207,13 @@ function githubInputs() { // default to non-reproducible builds var reproducible = false; + var useNix = false; if (process.env[`REPRODUCIBLE`] == "true") { // we want a reproducible build reproducible = true; + if (process.env[`USE_NIX`] == "true") { + useNix = true; + } } const { payload } = github.context; @@ -252,6 +257,7 @@ function githubInputs() { branch, sourceVersion, reproducible, + useNix, updateInterval, updateBackOff, hideCloudWatchLogs, @@ -267,6 +273,7 @@ function inputs2Parameters(inputs) { branch, sourceVersion, reproducible, + useNix, gpSshPrivateKeyB64, } = inputs; @@ -278,6 +285,7 @@ function inputs2Parameters(inputs) { branch, sourceVersion, reproducible, + useNix, gpSshPrivateKeyB64, }; } diff --git a/dist/index.js b/dist/index.js index 436c465..da9f52f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -63,6 +63,7 @@ async function build(sdk, params, config) { branch: params.branch, sourceVersion: params.sourceVersion, reproducible: params.reproducible, + useNix: params.useNix, gpSshPrivateKeyB64: params.gpSshPrivateKeyB64, imageTag, }), @@ -107,15 +108,15 @@ async function waitForBuildEndTime( }) ), !hideCloudWatchLogs && - logGroupName && - cloudWatchLogs.send( - new GetLogEventsCommand({ - logGroupName, - logStreamName, - startFromHead, - nextToken, - }) - ), + logGroupName && + cloudWatchLogs.send( + new GetLogEventsCommand({ + logGroupName, + logStreamName, + startFromHead, + nextToken, + }) + ), ]).catch((err) => { errObject = err; /* Returning [] here so that the assignment above @@ -212,9 +213,13 @@ function githubInputs() { // default to non-reproducible builds var reproducible = false; + var useNix = false; if (process.env[`REPRODUCIBLE`] == "true") { // we want a reproducible build reproducible = true; + if (process.env[`USE_NIX`] == "true") { + useNix = true; + } } const { payload } = github.context; @@ -258,6 +263,7 @@ function githubInputs() { branch, sourceVersion, reproducible, + useNix, updateInterval, updateBackOff, hideCloudWatchLogs, @@ -273,6 +279,7 @@ function inputs2Parameters(inputs) { branch, sourceVersion, reproducible, + useNix, gpSshPrivateKeyB64, } = inputs; @@ -284,6 +291,7 @@ function inputs2Parameters(inputs) { branch, sourceVersion, reproducible, + useNix, gpSshPrivateKeyB64, }; }