Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g committed Feb 1, 2024
1 parent c663295 commit 242ee9a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
15 changes: 9 additions & 6 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}));
Expand Down
17 changes: 11 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,33 @@ async function run(): Promise<void> {

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);
});
Expand Down

0 comments on commit 242ee9a

Please sign in to comment.