File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,18 @@ if [[ $OSTYPE =~ darwin ]]; then
36
36
fi
37
37
# Allow binary caches for user
38
38
add_config " trusted-users = root ${USER:- } "
39
- # Add github access token
39
+ # Add a GitHub access token.
40
+ # Token-less access is subject to lower rate limits.
40
41
if [[ -n " ${INPUT_GITHUB_ACCESS_TOKEN:- } " ]]; then
42
+ echo " ::debug::Using the provided github_access_token for github.com"
41
43
add_config " access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN "
42
- elif [[ -n " ${GITHUB_TOKEN:- } " ]]; then
44
+ # Use the default GitHub token if available.
45
+ # Skip this step if running an Enterprise instance. The default token there does not work for github.com.
46
+ elif [[ -n " ${GITHUB_TOKEN:- } " && $GITHUB_SERVER_URL == " https://github.com" ]]; then
47
+ echo " ::debug::Using the default GITHUB_TOKEN for github.com"
43
48
add_config " access-tokens = github.com=$GITHUB_TOKEN "
49
+ else
50
+ echo " ::debug::Continuing without a GitHub access token"
44
51
fi
45
52
# Append extra nix configuration if provided
46
53
if [[ -n " ${INPUT_EXTRA_NIX_CONFIG:- } " ]]; then
You can’t perform that action at this time.
0 commit comments