Skip to content

Commit

Permalink
Change to $NPM_AUTH_TOKEN_SHARED
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored May 11, 2023
1 parent 57b5e6a commit c37b9f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build_node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

set -e

if [ -n "$NPM_AUTH_TOKEN" ]; then
if [ -n "$NPM_AUTH_TOKEN_SHARED" ]; then
# Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG-"$HOME/.npmrc"}"
NPM_REGISTRY_URL="${NPM_REGISTRY_URL-https://registry.npmjs.org}"

# Allow registry.npmjs.org to be overridden with an environment variable
printf "//%s/:_authToken=%s\\nregistry=%s" "$NPM_REGISTRY_URL" "$NPM_AUTH_TOKEN" "$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG"
printf "//%s/:_authToken=%s\\nregistry=%s" "$NPM_REGISTRY_URL" "$NPM_AUTH_TOKEN_SHARED" "$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG"
chmod 0600 "$NPM_CONFIG_USERCONFIG"
fi

Expand Down

0 comments on commit c37b9f2

Please sign in to comment.