Skip to content

Commit 67388ca

Browse files
authored
Merge pull request #157 from zimbatm/default-token
Fix rate-limits by using github.token by default
2 parents 25d64bb + a4b8aaf commit 67388ca

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ runs:
2626
INPUT_INSTALL_OPTIONS: ${{ inputs.install_options }}
2727
INPUT_INSTALL_URL: ${{ inputs.install_url }}
2828
INPUT_NIX_PATH: ${{ inputs.nix_path }}
29+
GITHUB_TOKEN: ${{ github.token }}

install-nix.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ add_config "max-jobs = auto"
2222
# Allow binary caches for user
2323
add_config "trusted-users = root $USER"
2424
# Add github access token
25-
if [[ $INPUT_GITHUB_ACCESS_TOKEN != "" ]]; then
25+
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
2626
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
27+
elif [[ -n "${GITHUB_TOKEN:-}" ]]; then
28+
add_config "access-tokens = github.com=$GITHUB_TOKEN"
2729
fi
2830
# Append extra nix configuration if provided
2931
if [[ $INPUT_EXTRA_NIX_CONFIG != "" ]]; then

0 commit comments

Comments
 (0)