File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 7
7
runs :
8
8
using : ' node16'
9
9
main : ' dist/index.js'
10
+ env :
11
+ GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -16,7 +16,13 @@ if ! type -p nix &>/dev/null ; then
16
16
# Set jobs to number of cores
17
17
add_config " max-jobs = auto"
18
18
# Allow binary caches for user
19
- add_config " trusted-users = root $USER "
19
+ add_config " trusted-users = root ${USER:- } "
20
+ # Add github access token
21
+ if [[ -n " ${INPUT_GITHUB_ACCESS_TOKEN:- } " ]]; then
22
+ add_config " access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN "
23
+ elif [[ -n " ${GITHUB_TOKEN:- } " ]]; then
24
+ add_config " access-tokens = github.com=$GITHUB_TOKEN "
25
+ fi
20
26
# Append extra nix configuration if provided
21
27
22
28
# Nix installer flags
@@ -51,8 +57,9 @@ if ! type -p nix &>/dev/null ; then
51
57
fi
52
58
53
59
# Set paths
54
- echo " /nix/var/nix/profiles/per-user/$USER /profile/bin" >> " $GITHUB_PATH "
55
60
echo " /nix/var/nix/profiles/default/bin" >> " $GITHUB_PATH "
61
+ # new path for nix 2.14
62
+ echo " $HOME /.nix-profile/bin" >> " $GITHUB_PATH "
56
63
57
64
export NIX_PATH=nixpkgs=channel:nixpkgs-unstable
58
65
echo " NIX_PATH=${NIX_PATH} " >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments