From 214a4f33b1474db7765d191b84ac30c6f9b1812e Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Fri, 23 Jun 2023 23:57:59 +0200 Subject: [PATCH] Set default value of github_access_token to the automatically generated GitHub token --- action.yml | 6 ++---- nix-quick-install.sh | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 66108aa..ce7dda6 100644 --- a/action.yml +++ b/action.yml @@ -26,11 +26,9 @@ inputs: you define are supported by the Nix version you're using. github_access_token: - required: false + default: ${{ github.token }} description: | - Configure Nix to use the specified token when fetching from GitHub. If - this setting is not specified, nix-quick-install-action will use the - content of the GITHUB_TOKEN environment variable instead (if set). + Configure Nix to use the specified token when fetching from GitHub. nix_on_tmpfs: required: true diff --git a/nix-quick-install.sh b/nix-quick-install.sh index 7077163..3de9a57 100755 --- a/nix-quick-install.sh +++ b/nix-quick-install.sh @@ -71,9 +71,6 @@ fi if [[ -n "${GITHUB_ACCESS_TOKEN:-}" ]]; then echo >>"$NIX_CONF_FILE" \ "access-tokens = github.com=$GITHUB_ACCESS_TOKEN" -elif [[ -n "${GITHUB_TOKEN:-}" ]]; then - echo >>"$NIX_CONF_FILE" \ - "access-tokens = github.com=$GITHUB_TOKEN" fi # Populate the nix db