add installCommand option

By using installCommand, it's possible to avoid yet another pull of
nixpkgs and speed-up the CI.
This commit is contained in:
zimbatm 2020-08-26 21:10:53 +02:00
commit ffed6b919f
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
4 changed files with 27 additions and 2 deletions

View file

@ -12,11 +12,14 @@ const signingKey = core.getInput('signingKey');
const authToken = core.getInput('authToken')
const skipPush = core.getInput('skipPush');
const cachixExecutable = '/nix/var/nix/profiles/per-user/runner/profile/bin/cachix';
const installCommand =
core.getInput('installCommand') ||
"nix-env --quiet -iA cachix -f https://cachix.org/api/v1/install";
async function setup() {
try {
core.startGroup('Cachix: installing')
await exec.exec('nix-env', ['--quiet', '-iA', 'cachix', '-f', 'https://cachix.org/api/v1/install']);
await exec.exec('bash', ['-c', installCommand]);
core.endGroup()
// for private caches