expose nix executables also for runner user
This commit is contained in:
parent
addc7fa7a2
commit
15adaed2d7
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@ -18,3 +18,6 @@ jobs:
|
|||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: ./
|
uses: ./
|
||||||
- run: nix-build test.nix
|
- run: nix-build test.nix
|
||||||
|
- run: nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/ab5863afada3c1b50fc43bf774b75ea71b287cde
|
||||||
|
# cachix should be available
|
||||||
|
- run: which cachix
|
@ -46,7 +46,7 @@ function run() {
|
|||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install');
|
||||||
yield exec.exec("sh", [nixInstall, "--daemon"]);
|
yield exec.exec("sh", [nixInstall, "--daemon"]);
|
||||||
core.exportVariable('PATH', `${PATH}:/nix/var/nix/profiles/default/bin`);
|
core.exportVariable('PATH', `${PATH}:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/per-user/runner/profile/bin`);
|
||||||
core.exportVariable('NIX_PATH', `/nix/var/nix/profiles/per-user/root/channels`);
|
core.exportVariable('NIX_PATH', `/nix/var/nix/profiles/per-user/root/channels`);
|
||||||
if (os_1.type() == "Darwin") {
|
if (os_1.type() == "Darwin") {
|
||||||
// macOS needs certificates hints
|
// macOS needs certificates hints
|
||||||
|
@ -35,7 +35,7 @@ async function run() {
|
|||||||
// TODO: retry due to all the things that go wrong
|
// TODO: retry due to all the things that go wrong
|
||||||
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
|
const nixInstall = await tc.downloadTool('https://nixos.org/nix/install');
|
||||||
await exec.exec("sh", [nixInstall, "--daemon"]);
|
await exec.exec("sh", [nixInstall, "--daemon"]);
|
||||||
core.exportVariable('PATH', `${PATH}:/nix/var/nix/profiles/default/bin`)
|
core.exportVariable('PATH', `${PATH}:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/per-user/runner/profile/bin`)
|
||||||
core.exportVariable('NIX_PATH', `/nix/var/nix/profiles/per-user/root/channels`)
|
core.exportVariable('NIX_PATH', `/nix/var/nix/profiles/per-user/root/channels`)
|
||||||
|
|
||||||
if (type() == "Darwin") {
|
if (type() == "Darwin") {
|
||||||
|
Loading…
Reference in New Issue
Block a user