Skip to content

Commit a4b8aaf

Browse files
committed
Fix rate-limits by using github.token by default
Turns out there is a default github token we can use to talk to github and avoid the rate limit issues.
1 parent 25d64bb commit a4b8aaf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

action.yml

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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)