File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ function installNpmPackage(){
2020 elif [ " ${INPUT_DEBUG_LOG} " == " true" ] && [ " $scope " == " global" ]; then
2121 sudo npm install -g $package
2222 elif [ " $scope " == " local" ]; then
23- npm install $package --log-level=error --no-fund --no-audit $package > /dev/null 2>&1
23+ npm install $package --log-level=error --no-fund --no-audit $package > /dev/null
2424 else
25- sudo npm install -g --log-level=error --no-fund --no-audit $package > /dev/null 2>&1
25+ sudo npm install -g --log-level=error --no-fund --no-audit $package > /dev/null
2626 fi
2727
2828 if [ " ${?} " -ne 0 ]; then
@@ -41,6 +41,23 @@ function installAwsCdk(){
4141 fi
4242}
4343
44+ function npmCi(){
45+ if [ -e " package.json" ]; then
46+ echo " Run npm ci"
47+ if [ " ${INPUT_DEBUG_LOG} " == " true" ]; then
48+ npm ci
49+ else
50+ npm ci --log-level=error --no-fund --no-audit > /dev/null
51+ fi
52+
53+ if [ " ${?} " -ne 0 ]; then
54+ echo " Failed to run npm ci"
55+ else
56+ echo " Successful npm ci"
57+ fi
58+ fi
59+ }
60+
4461function installPipRequirements(){
4562 if [ -e " requirements.txt" ]; then
4663 echo " Install requirements.txt"
@@ -97,8 +114,7 @@ ${output}
97114function main(){
98115 parseInputs
99116 cd ${GITHUB_WORKSPACE} /${INPUT_WORKING_DIR}
100- echo " run npm ci"
101- npm ci
117+ npmCi
102118 installAwsCdk
103119 installPipRequirements
104120 runCdk ${INPUT_CDK_ARGS}
You can’t perform that action at this time.
0 commit comments