File tree 2 files changed +6
-3
lines changed
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"}"
25
25
NPM_STRICT_SSL=" ${NPM_STRICT_SSL:- " true" } "
26
26
NPM_REGISTRY_SCHEME=" https"
27
27
if ! [ " $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/\/+$// ' ) "
29
29
NPM_REGISTRY_URL=" ${NPM_REGISTRY_SCHEME} ://$NPM_REGISTRY_DOMAIN "
30
30
NPM_CONFIG_USERCONFIG=" ${NPM_CONFIG_USERCONFIG:- " $HOME /.npmrc" } "
31
31
@@ -40,7 +40,7 @@ if [ -n "$NPM_CUSTOM_NPMRC" ]; then
40
40
echo " $NPM_CUSTOM_NPMRC " > " $NPM_CONFIG_USERCONFIG "
41
41
chmod 0600 " $NPM_CONFIG_USERCONFIG "
42
42
elif [ -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 "
44
44
chmod 0600 " $NPM_CONFIG_USERCONFIG "
45
45
fi
46
46
Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ function isMinorChange(message) {
85
85
return minorTagsRegex . test ( firstLine ) ;
86
86
}
87
87
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
+ }
89
92
const getFromRegistry = bent ( 'json' , registryUrl ) ;
90
93
const event = JSON . parse ( fs . readFileSync ( '/github/workflow/event.json' ) . toString ( ) ) ;
91
94
const deployDir = path . join ( process . cwd ( ) , process . env . DEPLOY_DIR || '.' ) ;
You can’t perform that action at this time.
0 commit comments