diff --git a/dist/main/index.js b/dist/main/index.js index 6ee5898..f98580c 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -7122,26 +7122,29 @@ function run() { const which = __nccwpck_require__(6143); const resolvedOrNull = yield which("nsc", { nothrow: true }); if (resolvedOrNull == null) { - yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Prepare access to Namespace`, () => __awaiter(this, void 0, void 0, function* () { + yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group("Prepare access to Namespace", () => __awaiter(this, void 0, void 0, function* () { yield installNsc(); })); } else { - _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Namespace Cloud CLI found.`); + _actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Namespace Cloud CLI found."); } yield _actions_exec__WEBPACK_IMPORTED_MODULE_2__.exec("nsc version"); - yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Log into Namespace workspace`, () => __awaiter(this, void 0, void 0, function* () { + yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group("Log into Namespace workspace", () => __awaiter(this, void 0, void 0, function* () { yield ensureNscloudToken(); })); const { NSC_DOCKER_LOGIN, NSC_CONTAINER_REGISTRY } = process.env; let registry = NSC_CONTAINER_REGISTRY; - if (NSC_DOCKER_LOGIN == null || registry == null || NSC_DOCKER_LOGIN != "1" || registry == "") { - registry = yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Log into Namespace workspace container registry`, () => __awaiter(this, void 0, void 0, function* () { + if (NSC_DOCKER_LOGIN == null || + registry == null || + NSC_DOCKER_LOGIN !== "1" || + registry === "") { + registry = yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group("Log into Namespace workspace container registry", () => __awaiter(this, void 0, void 0, function* () { yield ensureNscloudToken(); return yield dockerLogin(); })); } - yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Registry address`, () => __awaiter(this, void 0, void 0, function* () { + yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group("Registry address", () => __awaiter(this, void 0, void 0, function* () { _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(registry); _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("registry-address", registry); })); diff --git a/main.ts b/main.ts index ba9beca..70c9f8b 100644 --- a/main.ts +++ b/main.ts @@ -10,28 +10,33 @@ async function run(): Promise { const resolvedOrNull = await which("nsc", { nothrow: true }); if (resolvedOrNull == null) { - await core.group(`Prepare access to Namespace`, async () => { + await core.group("Prepare access to Namespace", async () => { await installNsc(); }); } else { - core.info(`Namespace Cloud CLI found.`); + core.info("Namespace Cloud CLI found."); } await exec.exec("nsc version"); - await core.group(`Log into Namespace workspace`, async () => { + await core.group("Log into Namespace workspace", async () => { await ensureNscloudToken(); }); const { NSC_DOCKER_LOGIN, NSC_CONTAINER_REGISTRY } = process.env; let registry = NSC_CONTAINER_REGISTRY; - if (NSC_DOCKER_LOGIN == null || registry == null || NSC_DOCKER_LOGIN != "1" || registry == "") { - registry = await core.group(`Log into Namespace workspace container registry`, async () => { + if ( + NSC_DOCKER_LOGIN == null || + registry == null || + NSC_DOCKER_LOGIN !== "1" || + registry === "" + ) { + registry = await core.group("Log into Namespace workspace container registry", async () => { await ensureNscloudToken(); return await dockerLogin(); }); } - await core.group(`Registry address`, async () => { + await core.group("Registry address", async () => { core.info(registry); core.setOutput("registry-address", registry); });