diff --git a/action.yml b/action.yml index abc2cc9b..4867c5b0 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,7 @@ inputs: description: 'Signing key secret retrieved after creating binary cache on https://cachix.org' skipPush: description: 'Set to true to disable pushing build results to the cache' + default: 'false' pathsToPush: description: 'Whitespace-separated list of paths to push. Leave empty to push every build result.' pushFilter: @@ -21,9 +22,10 @@ inputs: description: 'Extra command-line arguments to pass to cachix. If empty, defaults to -j8' skipAddingSubstituter: description: 'Set to true to skip adding cachix cache as a substitute' + default: 'false' useDaemon: description: "Push store paths to the cache as they're built with the Cachix Daemon" - default: true + default: 'true' cachixBin: description: 'Provide a custom path to the cachix binary' installCommand: diff --git a/dist/main/index.js b/dist/main/index.js index deb398a9..a75eb7d2 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -7740,11 +7740,11 @@ const name = core.getInput('name', { required: true }); const extraPullNames = core.getInput('extraPullNames'); const signingKey = core.getInput('signingKey'); const authToken = core.getInput('authToken'); -const skipPush = core.getInput('skipPush'); +const skipPush = core.getBooleanInput('skipPush'); const pathsToPush = core.getInput('pathsToPush'); const pushFilter = core.getInput('pushFilter'); const cachixArgs = core.getInput('cachixArgs'); -const skipAddingSubstituter = core.getInput('skipAddingSubstituter'); +const skipAddingSubstituter = core.getBooleanInput('skipAddingSubstituter'); const useDaemon = core.getBooleanInput('useDaemon'); const cachixBinInput = core.getInput('cachixBin'); const installCommand = core.getInput('installCommand') || @@ -7782,7 +7782,7 @@ async function setup() { if (authToken !== "") { await exec.exec(cachixBin, ['authtoken', authToken]); } - if (skipAddingSubstituter === 'true') { + if (skipAddingSubstituter) { core.info('Not adding Cachix cache to substituters as skipAddingSubstituter is set to true'); } else { @@ -7860,7 +7860,7 @@ async function upload() { const cachixBin = core.getState('cachixBin'); const supportsDaemon = core.getState('supportsDaemon') === 'true'; try { - if (skipPush === 'true') { + if (skipPush) { core.info('Pushing is disabled as skipPush is set to true'); } else if (signingKey !== "" || authToken !== "") { diff --git a/src/main.ts b/src/main.ts index bfc1eed2..68ab4ee7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,11 +14,11 @@ const name = core.getInput('name', { required: true }); const extraPullNames = core.getInput('extraPullNames'); const signingKey = core.getInput('signingKey'); const authToken = core.getInput('authToken') -const skipPush = core.getInput('skipPush'); +const skipPush = core.getBooleanInput('skipPush'); const pathsToPush = core.getInput('pathsToPush'); const pushFilter = core.getInput('pushFilter'); const cachixArgs = core.getInput('cachixArgs'); -const skipAddingSubstituter = core.getInput('skipAddingSubstituter'); +const skipAddingSubstituter = core.getBooleanInput('skipAddingSubstituter'); const useDaemon = core.getBooleanInput('useDaemon'); const cachixBinInput = core.getInput('cachixBin'); const installCommand = @@ -64,7 +64,7 @@ async function setup() { await exec.exec(cachixBin, ['authtoken', authToken]); } - if (skipAddingSubstituter === 'true') { + if (skipAddingSubstituter) { core.info('Not adding Cachix cache to substituters as skipAddingSubstituter is set to true') } else { core.startGroup(`Cachix: using cache ` + name); @@ -156,7 +156,7 @@ async function upload() { const supportsDaemon = core.getState('supportsDaemon') === 'true'; try { - if (skipPush === 'true') { + if (skipPush) { core.info('Pushing is disabled as skipPush is set to true'); } else if (signingKey !== "" || authToken !== "") { if (useDaemon && supportsDaemon) {