From 87d394c1b4e27156e26e606b3de39c47fda3aef3 Mon Sep 17 00:00:00 2001 From: arc0035 Date: Thu, 2 Nov 2023 02:27:46 +0800 Subject: [PATCH] echo path --- .github/workflows/main.yml | 2 +- start.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4cd5ec8b..ce5117e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: git pull bash ./gradlew build -x test cd dist - echo $PATH + export DBPWD=${{secrets.SPRING_DATASOURCE_PASSWORD}} bash stop.sh bash start.sh diff --git a/start.sh b/start.sh index 14da4e4d..a4794975 100644 --- a/start.sh +++ b/start.sh @@ -5,7 +5,8 @@ CLASSPATH='conf/:apps/*:lib/*' CURRENT_DIR=$(pwd)/ LOG_DIR=${CURRENT_DIR}log CONF_DIR=${CURRENT_DIR}conf - +DBPWD=$SPRING_DATASOURCE_PASSWORD +sed -i "s/\$\{SPRING_DATASOURCE_PASSWORD\}/$DBPWD/g" conf/application.yml > conf/application.yml SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured"