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

4
dist/main/index.js vendored
View file

@ -982,11 +982,13 @@ 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";
function setup() {
return __awaiter(this, void 0, void 0, function* () {
try {
core.startGroup('Cachix: installing');
yield exec.exec('nix-env', ['--quiet', '-iA', 'cachix', '-f', 'https://cachix.org/api/v1/install']);
yield exec.exec('bash', ['-c', installCommand]);
core.endGroup();
// for private caches
if (authToken !== "") {