Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a56e3a8089 | ||
|
81eb746179 | ||
|
2cce1fd76b |
@ -25,18 +25,11 @@ if [[ $OSTYPE =~ darwin ]]; then
|
||||
fi
|
||||
# Allow binary caches for user
|
||||
add_config "trusted-users = root ${USER:-}"
|
||||
# Add a GitHub access token.
|
||||
# Token-less access is subject to lower rate limits.
|
||||
# Add github access token
|
||||
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
|
||||
echo "::debug::Using the provided github_access_token for github.com"
|
||||
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
|
||||
# Use the default GitHub token if available.
|
||||
# Skip this step if running an Enterprise instance. The default token there does not work for github.com.
|
||||
elif [[ -n "${GITHUB_TOKEN:-}" && $GITHUB_SERVER_URL == "https://github.com" ]]; then
|
||||
echo "::debug::Using the default GITHUB_TOKEN for github.com"
|
||||
elif [[ -n "${GITHUB_TOKEN:-}" ]]; then
|
||||
add_config "access-tokens = github.com=$GITHUB_TOKEN"
|
||||
else
|
||||
echo "::debug::Continuing without a GitHub access token"
|
||||
fi
|
||||
# Append extra nix configuration if provided
|
||||
if [[ -n "${INPUT_EXTRA_NIX_CONFIG:-}" ]]; then
|
||||
@ -98,5 +91,10 @@ if [[ -n "${INPUT_NIX_PATH:-}" ]]; then
|
||||
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
# Set temporary directory (if not already set) to fix https://github.com/cachix/install-nix-action/issues/197
|
||||
if [[ -z "${TMPDIR:-}" ]]; then
|
||||
echo "TMPDIR=${RUNNER_TEMP}" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
# Close the log message group which was opened above
|
||||
echo "::endgroup::"
|
||||
|
Loading…
Reference in New Issue
Block a user