mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Fix merge conflict with main
This commit is contained in:
commit
ff707a0bf7
3 changed files with 44 additions and 29 deletions
24
dist/index.js
generated
vendored
24
dist/index.js
generated
vendored
|
@ -97375,7 +97375,7 @@ class NixInstallerAction {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
core.debug("Docker not detected, not enabling docker shim.");
|
core.debug("Docker not detected, not enabling docker shim.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -97595,8 +97595,14 @@ class NixInstallerAction {
|
||||||
extraConf += "\n";
|
extraConf += "\n";
|
||||||
}
|
}
|
||||||
if (this.flakehub) {
|
if (this.flakehub) {
|
||||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
try {
|
||||||
extraConf += "\n";
|
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||||
|
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||||
|
extraConf += "\n";
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
core.warning(`Failed to set up FlakeHub: ${e}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||||
extraConf += this.extraConf.join("\n");
|
extraConf += this.extraConf.join("\n");
|
||||||
|
@ -97821,7 +97827,7 @@ class NixInstallerAction {
|
||||||
core.addPath(homeNixProfilePath);
|
core.addPath(homeNixProfilePath);
|
||||||
core.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
core.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch {
|
||||||
core.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
core.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97932,7 +97938,7 @@ class NixInstallerAction {
|
||||||
]);
|
]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch {
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
await exec.exec("rm", ["-f", kvmRules]);
|
await exec.exec("rm", ["-f", kvmRules]);
|
||||||
}
|
}
|
||||||
|
@ -97958,8 +97964,8 @@ class NixInstallerAction {
|
||||||
conclusion: await this.getWorkflowConclusion(),
|
conclusion: await this.getWorkflowConclusion(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (e) {
|
||||||
core.debug(`Error submitting post-run diagnostics report: ${error}`);
|
core.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async getWorkflowConclusion() {
|
async getWorkflowConclusion() {
|
||||||
|
@ -97995,8 +98001,8 @@ class NixInstallerAction {
|
||||||
// Assume success if no jobs failed or were canceled
|
// Assume success if no jobs failed or were canceled
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (e) {
|
||||||
core.debug(`Error determining final disposition: ${error}`);
|
core.debug(`Error determining final disposition: ${e}`);
|
||||||
return "unavailable";
|
return "unavailable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
24
dist/main.js
generated
vendored
24
dist/main.js
generated
vendored
|
@ -114,7 +114,7 @@ class NixInstallerAction {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch {
|
||||||
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -334,8 +334,14 @@ class NixInstallerAction {
|
||||||
extraConf += "\n";
|
extraConf += "\n";
|
||||||
}
|
}
|
||||||
if (this.flakehub) {
|
if (this.flakehub) {
|
||||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
try {
|
||||||
extraConf += "\n";
|
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||||
|
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||||
|
extraConf += "\n";
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
actionsCore.warning(`Failed to set up FlakeHub: ${e}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||||
extraConf += this.extraConf.join("\n");
|
extraConf += this.extraConf.join("\n");
|
||||||
|
@ -560,7 +566,7 @@ class NixInstallerAction {
|
||||||
actionsCore.addPath(homeNixProfilePath);
|
actionsCore.addPath(homeNixProfilePath);
|
||||||
actionsCore.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
actionsCore.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch {
|
||||||
actionsCore.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
actionsCore.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -671,7 +677,7 @@ class NixInstallerAction {
|
||||||
]);
|
]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch {
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
await actionsExec.exec("rm", ["-f", kvmRules]);
|
await actionsExec.exec("rm", ["-f", kvmRules]);
|
||||||
}
|
}
|
||||||
|
@ -697,8 +703,8 @@ class NixInstallerAction {
|
||||||
conclusion: await this.getWorkflowConclusion(),
|
conclusion: await this.getWorkflowConclusion(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (e) {
|
||||||
actionsCore.debug(`Error submitting post-run diagnostics report: ${error}`);
|
actionsCore.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async getWorkflowConclusion() {
|
async getWorkflowConclusion() {
|
||||||
|
@ -734,8 +740,8 @@ class NixInstallerAction {
|
||||||
// Assume success if no jobs failed or were canceled
|
// Assume success if no jobs failed or were canceled
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (e) {
|
||||||
actionsCore.debug(`Error determining final disposition: ${error}`);
|
actionsCore.debug(`Error determining final disposition: ${e}`);
|
||||||
return "unavailable";
|
return "unavailable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
25
src/main.ts
25
src/main.ts
|
@ -162,7 +162,7 @@ class NixInstallerAction {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch {
|
||||||
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -438,8 +438,13 @@ class NixInstallerAction {
|
||||||
extraConf += "\n";
|
extraConf += "\n";
|
||||||
}
|
}
|
||||||
if (this.flakehub) {
|
if (this.flakehub) {
|
||||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
try {
|
||||||
extraConf += "\n";
|
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||||
|
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||||
|
extraConf += "\n";
|
||||||
|
} catch (e) {
|
||||||
|
actionsCore.warning(`Failed to set up FlakeHub: ${e}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||||
extraConf += this.extraConf.join("\n");
|
extraConf += this.extraConf.join("\n");
|
||||||
|
@ -712,7 +717,7 @@ class NixInstallerAction {
|
||||||
actionsCore.info(
|
actionsCore.info(
|
||||||
`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``,
|
`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch {
|
||||||
actionsCore.info(
|
actionsCore.info(
|
||||||
"Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.",
|
"Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.",
|
||||||
);
|
);
|
||||||
|
@ -862,7 +867,7 @@ class NixInstallerAction {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch {
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
await actionsExec.exec("rm", ["-f", kvmRules]);
|
await actionsExec.exec("rm", ["-f", kvmRules]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -888,10 +893,8 @@ class NixInstallerAction {
|
||||||
this.idslib.recordEvent(EVENT_CONCLUDE_WORKFLOW, {
|
this.idslib.recordEvent(EVENT_CONCLUDE_WORKFLOW, {
|
||||||
conclusion: await this.getWorkflowConclusion(),
|
conclusion: await this.getWorkflowConclusion(),
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
actionsCore.debug(
|
actionsCore.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||||
`Error submitting post-run diagnostics report: ${error}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -938,8 +941,8 @@ class NixInstallerAction {
|
||||||
|
|
||||||
// Assume success if no jobs failed or were canceled
|
// Assume success if no jobs failed or were canceled
|
||||||
return "success";
|
return "success";
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
actionsCore.debug(`Error determining final disposition: ${error}`);
|
actionsCore.debug(`Error determining final disposition: ${e}`);
|
||||||
return "unavailable";
|
return "unavailable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue