mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
commit
33a8b9cc1f
2 changed files with 6 additions and 12 deletions
9
dist/main/index.js
vendored
9
dist/main/index.js
vendored
|
|
@ -1033,7 +1033,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const child_process_1 = __webpack_require__(129);
|
|
||||||
const coreCommand = __importStar(__webpack_require__(431));
|
const coreCommand = __importStar(__webpack_require__(431));
|
||||||
const exec = __importStar(__webpack_require__(986));
|
const exec = __importStar(__webpack_require__(986));
|
||||||
exports.IsPost = !!process.env['STATE_isPost'];
|
exports.IsPost = !!process.env['STATE_isPost'];
|
||||||
|
|
@ -1076,20 +1075,18 @@ function setup() {
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
throw (error);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function upload() {
|
function upload() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
core.startGroup('Cachix: push');
|
||||||
try {
|
try {
|
||||||
if (skipPush === 'true') {
|
if (skipPush === 'true') {
|
||||||
core.info('Pushing is disabled as skipPush is set to true');
|
core.info('Pushing is disabled as skipPush is set to true');
|
||||||
}
|
}
|
||||||
else if (signingKey !== "" || authToken !== "") {
|
else if (signingKey !== "" || authToken !== "") {
|
||||||
core.startGroup('Cachix: pushing paths');
|
yield exec.exec(`${__dirname}/push-paths.sh`, [cachixExecutable, name]);
|
||||||
child_process_1.execFileSync(`${__dirname}/push-paths.sh`, [cachixExecutable, name], { stdio: 'inherit' });
|
|
||||||
core.endGroup();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info('Pushing is disabled as signing key nor auth token are set.');
|
core.info('Pushing is disabled as signing key nor auth token are set.');
|
||||||
|
|
@ -1097,8 +1094,8 @@ function upload() {
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
throw (error);
|
|
||||||
}
|
}
|
||||||
|
core.endGroup();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Main
|
// Main
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import { execFileSync } from 'child_process';
|
|
||||||
import * as coreCommand from '@actions/core/lib/command'
|
import * as coreCommand from '@actions/core/lib/command'
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
|
|
@ -48,25 +47,23 @@ async function setup() {
|
||||||
await exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > /tmp/store-path-pre-build`]);
|
await exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > /tmp/store-path-pre-build`]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
throw (error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function upload() {
|
async function upload() {
|
||||||
|
core.startGroup('Cachix: push');
|
||||||
try {
|
try {
|
||||||
if (skipPush === 'true') {
|
if (skipPush === 'true') {
|
||||||
core.info('Pushing is disabled as skipPush is set to true');
|
core.info('Pushing is disabled as skipPush is set to true');
|
||||||
} else if (signingKey !== "" || authToken !== "") {
|
} else if (signingKey !== "" || authToken !== "") {
|
||||||
core.startGroup('Cachix: pushing paths');
|
await exec.exec(`${__dirname}/push-paths.sh`, [cachixExecutable, name]);
|
||||||
execFileSync(`${__dirname}/push-paths.sh`, [cachixExecutable, name], { stdio: 'inherit' });
|
|
||||||
core.endGroup();
|
|
||||||
} else {
|
} else {
|
||||||
core.info('Pushing is disabled as signing key nor auth token are set.');
|
core.info('Pushing is disabled as signing key nor auth token are set.');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
throw (error);
|
|
||||||
}
|
}
|
||||||
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main
|
// Main
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue