add github_access_token option

I'm starting to see rate limit issues with GitHub Actions more
frequently so I propose to make this option more readily available.
This commit is contained in:
zimbatm 2022-12-27 19:51:55 +01:00
parent a590bb1bf6
commit c04fcbc179
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
3 changed files with 19 additions and 9 deletions

View file

@ -21,6 +21,10 @@ add_config() {
add_config "max-jobs = auto"
# Allow binary caches for 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"
fi
# Append extra nix configuration if provided
if [[ $INPUT_EXTRA_NIX_CONFIG != "" ]]; then
add_config "$INPUT_EXTRA_NIX_CONFIG"