mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Detected whether we're running in a Namespace runner, and if so, set init: none
. (#52)
Background: Namespace managed runners run each github job in a container, in a separate micro-vm managed by Namespace. These VMs and containers do not rely on systemd, and instead use Namespace's own init/process management.
This commit is contained in:
parent
721f94f7df
commit
7fa8f59903
3 changed files with 12 additions and 1 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -189,6 +189,10 @@ class NixInstallerAction {
|
||||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Detected `$ACT` environment, assuming this is a https://github.com/nektos/act created container, set `NOT_ACT=true` to override this. This will change the setting of the `init` to be compatible with `act`");
|
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Detected `$ACT` environment, assuming this is a https://github.com/nektos/act created container, set `NOT_ACT=true` to override this. This will change the setting of the `init` to be compatible with `act`");
|
||||||
execution_env.NIX_INSTALLER_INIT = "none";
|
execution_env.NIX_INSTALLER_INIT = "none";
|
||||||
}
|
}
|
||||||
|
if (process.env.NSC_VM_ID && !process.env.NOT_NAMESPACE) {
|
||||||
|
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Detected Namespace runner, assuming this is a https://namespace.so created container, set `NOT_NAMESPACE=true` to override this. This will change the setting of the `init` to be compatible with Namespace");
|
||||||
|
execution_env.NIX_INSTALLER_INIT = "none";
|
||||||
|
}
|
||||||
return execution_env;
|
return execution_env;
|
||||||
}
|
}
|
||||||
async execute_install(binary_path) {
|
async execute_install(binary_path) {
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -239,6 +239,13 @@ class NixInstallerAction {
|
||||||
execution_env.NIX_INSTALLER_INIT = "none";
|
execution_env.NIX_INSTALLER_INIT = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.NSC_VM_ID && !process.env.NOT_NAMESPACE) {
|
||||||
|
actions_core.info(
|
||||||
|
"Detected Namespace runner, assuming this is a https://namespace.so created container, set `NOT_NAMESPACE=true` to override this. This will change the setting of the `init` to be compatible with Namespace",
|
||||||
|
);
|
||||||
|
execution_env.NIX_INSTALLER_INIT = "none";
|
||||||
|
}
|
||||||
|
|
||||||
return execution_env;
|
return execution_env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue