From 15adaed2d7da7f5a4ec97e5c45de3c336708a375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 19 Nov 2019 11:50:49 +0100 Subject: [PATCH] expose nix executables also for runner user --- .github/workflows/test.yml | 3 +++ lib/main.js | 2 +- src/main.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3d3e3f..5a60b42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,3 +18,6 @@ jobs: - name: Install Nix uses: ./ - 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 \ No newline at end of file diff --git a/lib/main.js b/lib/main.js index 5cbd39e..14d234a 100644 --- a/lib/main.js +++ b/lib/main.js @@ -46,7 +46,7 @@ function run() { // TODO: retry due to all the things that go wrong const nixInstall = yield tc.downloadTool('https://nixos.org/nix/install'); 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`); if (os_1.type() == "Darwin") { // macOS needs certificates hints diff --git a/src/main.ts b/src/main.ts index e6f82fc..7df8ec2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -35,7 +35,7 @@ async function run() { // TODO: retry due to all the things that go wrong const nixInstall = await tc.downloadTool('https://nixos.org/nix/install'); 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`) if (type() == "Darwin") {