File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export NPM_STRICT_SSL="${INPUT_NPM_STRICT_SSL:-"$NPM_STRICT_SSL"}"
2525NPM_STRICT_SSL=" ${NPM_STRICT_SSL:- " true" } "
2626NPM_REGISTRY_SCHEME=" https"
2727if ! [ " $NPM_STRICT_SSL " = " true" ]; then NPM_REGISTRY_SCHEME=" http" ; fi
28- NPM_REGISTRY_DOMAIN=" $( echo " ${NPM_REGISTRY_URL:- registry.npmjs.org} " | sed -r ' s/https?:\/\///' ) "
28+ NPM_REGISTRY_DOMAIN=" $( echo " ${NPM_REGISTRY_URL:- registry.npmjs.org} " | sed -r ' s/https?:\/\///' | sed -r ' s/\/+$// ' ) "
2929NPM_REGISTRY_URL=" ${NPM_REGISTRY_SCHEME} ://$NPM_REGISTRY_DOMAIN "
3030NPM_CONFIG_USERCONFIG=" ${NPM_CONFIG_USERCONFIG:- " $HOME /.npmrc" } "
3131
@@ -40,7 +40,7 @@ if [ -n "$NPM_CUSTOM_NPMRC" ]; then
4040 echo " $NPM_CUSTOM_NPMRC " > " $NPM_CONFIG_USERCONFIG "
4141 chmod 0600 " $NPM_CONFIG_USERCONFIG "
4242elif [ -n " $NPM_AUTH_TOKEN " ]; then
43- printf " //%s/:_authToken=%s\\ nregistry=%s\\ nstrict-ssl=%s" " $NPM_REGISTRY_DOMAIN " " $NPM_AUTH_TOKEN " " $NPM_REGISTRY_URL " " $NPM_STRICT_SSL " > " $NPM_CONFIG_USERCONFIG "
43+ printf " //%s/:_authToken=%s\\ nregistry=%s\\ nstrict-ssl=%s" " $NPM_REGISTRY_DOMAIN " " $NPM_AUTH_TOKEN " " ${ NPM_REGISTRY_URL} / " " $NPM_STRICT_SSL " > " $NPM_CONFIG_USERCONFIG "
4444 chmod 0600 " $NPM_CONFIG_USERCONFIG "
4545fi
4646
Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ function isMinorChange(message) {
8585 return minorTagsRegex . test ( firstLine ) ;
8686}
8787
88- const registryUrl = process . env . NPM_REGISTRY_URL || 'https://registry.npmjs.org/' ;
88+ let registryUrl = process . env . NPM_REGISTRY_URL || 'https://registry.npmjs.org/' ;
89+ if ( ! registryUrl . endsWith ( '/' ) ) {
90+ registryUrl = `${ registryUrl } /` ;
91+ }
8992const getFromRegistry = bent ( 'json' , registryUrl ) ;
9093const event = JSON . parse ( fs . readFileSync ( '/github/workflow/event.json' ) . toString ( ) ) ;
9194const deployDir = path . join ( process . cwd ( ) , process . env . DEPLOY_DIR || '.' ) ;
You can’t perform that action at this time.
0 commit comments