From 61227e011a846df8e56c6c474a167f201987f27f Mon Sep 17 00:00:00 2001 From: Daeun <122000839+daeun084@users.noreply.github.com> Date: Sun, 1 Sep 2024 01:25:19 +0900 Subject: [PATCH] ci: update docker.yml --- .github/workflows/docker.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0b6e676..92d7499 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -28,10 +28,13 @@ jobs: run: sudo apt-get update && sudo apt-get install -y openjdk-17-jdk - name: Update application.yml with secrets - run: | - sed -i 's|${DB_URL}|'"${{ secrets.DB_URL }}"'|g' ./src/main/resources/application.yml - sed -i 's|${DB_HOST}|'"${{ secrets.DB_HOST }}"'|g' ./src/main/resources/application.yml - sed -i 's|${DB_PASSWORD}|'"${{ secrets.DB_PASSWORD }}"'|g' ./src/main/resources/application.yml + uses: microsoft/variable-substitution@v1 + with: + files: src/main/resources/application.yml + env: + spring.datasource.url: ${{ secrets.DB_URL }} + spring.datasource.username: ${{ secrets.DB_HOST }} + spring.datasource.password: ${{ secrets.DB_PASSWORD }} - name: Grant execute permission for gradlew run: chmod +x gradlew