diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 9c79c9e..bff4cbc 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -9,8 +9,6 @@ env: PACKAGE_NAME: ulthon_admin_release.tar.gz COMPOSE_PROJECT_NAME: ulthon_admin DB_HOSTNAME: host.docker.internal - APP_DEBUG_VALUE: "false" - DB_DEBUG_VALUE: "false" jobs: deploy_host15: @@ -29,14 +27,12 @@ jobs: env: MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} DB_HOSTNAME: ${{ env.DB_HOSTNAME }} - APP_DEBUG_VALUE: ${{ env.APP_DEBUG_VALUE }} - DB_DEBUG_VALUE: ${{ env.DB_DEBUG_VALUE }} run: | set -euo pipefail cp .example.env .env - awk -v host="$DB_HOSTNAME" -v newpwd="$MYSQL_PASSWORD" -v app_debug="$APP_DEBUG_VALUE" -v db_debug="$DB_DEBUG_VALUE" ' - BEGIN { has_host = 0; has_pwd = 0; has_app_debug = 0; has_db_debug = 0 } + awk -v host="$DB_HOSTNAME" -v newpwd="$MYSQL_PASSWORD" ' + BEGIN { has_host = 0; has_pwd = 0 } $0 ~ /^HOSTNAME=/ { print "HOSTNAME=" host has_host = 1 @@ -47,22 +43,10 @@ jobs: has_pwd = 1 next } - $0 ~ /^APP_DEBUG=/ { - print "APP_DEBUG=" app_debug - has_app_debug = 1 - next - } - $0 ~ /^DEBUG=/ { - print "DEBUG=" db_debug - has_db_debug = 1 - next - } { print } END { if (!has_host) print "HOSTNAME=" host if (!has_pwd) print "PASSWORD=" newpwd - if (!has_app_debug) print "APP_DEBUG=" app_debug - if (!has_db_debug) print "DEBUG=" db_debug }' .env > .env.tmp mv .env.tmp .env