Compare commits

..

2 Commits

Author SHA1 Message Date
167742cb88 don't insist $USER needs to be set 2023-03-01 05:51:32 +00:00
3755e30bd2 Support new Nix 2.14 profile PATH 2023-03-01 05:44:36 +00:00
2 changed files with 13 additions and 7 deletions

View File

@ -61,6 +61,11 @@ jobs:
- uses: actions/checkout@v3
- name: Install Nix
uses: ./
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake show github:NixOS/nixpkgs
installer-options:
@ -73,9 +78,9 @@ jobs:
- name: Install Nix
uses: ./
with:
nix_path: nixpkgs=channel:nixos-22.05
install_options: --tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve
install_url: https://nixos-nix-install-tests.cachix.org/serve/s62m7lc0q0mz2mxxm9q0kkrcg90njzhq/install
nix_path: nixpkgs=channel:nixos-21.05
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
- run: nix-build test.nix
oldest-supported-installer:
@ -88,8 +93,8 @@ jobs:
- name: Install Nix
uses: ./
with:
nix_path: nixpkgs=channel:nixos-22.05
install_url: https://releases.nixos.org/nix/nix-2.8.0/install
nix_path: nixpkgs=channel:nixos-21.05
install_url: https://releases.nixos.org/nix/nix-2.3.8/install
- run: nix-build test.nix
act-support:

View File

@ -20,7 +20,7 @@ add_config() {
# Set jobs to number of cores
add_config "max-jobs = auto"
# Allow binary caches for user
add_config "trusted-users = root $USER"
add_config "trusted-users = root ${USER:-}"
# Add github access token
if [[ $INPUT_GITHUB_ACCESS_TOKEN != "" ]]; then
add_config "access-tokens" "github.com=$INPUT_GITHUB_ACCESS_TOKEN"
@ -86,7 +86,8 @@ fi
# Set paths
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
echo "/nix/var/nix/profiles/per-user/$USER/profile/bin" >> "$GITHUB_PATH"
# new path for nix 2.14
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
if [[ $INPUT_NIX_PATH != "" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"