From 288dc379e480000cdf9034cb7f92649dfe6b7953 Mon Sep 17 00:00:00 2001 From: yooonwodyd Date: Fri, 22 Dec 2023 04:31:11 +0900 Subject: [PATCH] =?UTF-8?q?docker-image.yml=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 4 ++++ .gitignore | 1 + src/main/resources/application-jwt.yaml | 3 +++ src/main/resources/application-kakao.yaml | 3 +++ src/main/resources/application-rds.yaml | 4 +++- src/main/resources/application.yaml | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f811c36..5a08da9 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,6 +15,10 @@ jobs: with: java-version: 17 distribution: 'temurin' + - name: Add env properties + run: | + touch ./src/main/resources/env.yaml + echo "${{ secrets.ENV_YML }}" > ./src/main/resources/env.yaml - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/.gitignore b/.gitignore index 13ef52c..cd47a04 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ out/ ### VS Code ### .vscode/ +src/main/resources/env.yml diff --git a/src/main/resources/application-jwt.yaml b/src/main/resources/application-jwt.yaml index 80db2ac..58af048 100644 --- a/src/main/resources/application-jwt.yaml +++ b/src/main/resources/application-jwt.yaml @@ -1,2 +1,5 @@ +spring: + config: + import: "classpath:env.yml" jwt: secret: ${JWT_SECRET} diff --git a/src/main/resources/application-kakao.yaml b/src/main/resources/application-kakao.yaml index 653119d..3215af3 100644 --- a/src/main/resources/application-kakao.yaml +++ b/src/main/resources/application-kakao.yaml @@ -1,3 +1,6 @@ +spring: + config: + import: "classpath:env.yml" kakao: clientId: ${KAKAO_CLIENT_ID} redirectUrl: ${KAKAO_REDIRECT_URL} \ No newline at end of file diff --git a/src/main/resources/application-rds.yaml b/src/main/resources/application-rds.yaml index 5cda526..f3bb26e 100644 --- a/src/main/resources/application-rds.yaml +++ b/src/main/resources/application-rds.yaml @@ -13,8 +13,10 @@ # password: root # spring: + config: + import: "classpath:env.yml" datasource: url: jdbc:mariadb://happy-new-year.cp3aplx9qafk.ap-northeast-2.rds.amazonaws.com/happy_new_year driver-class-name: org.mariadb.jdbc.Driver username: ${RDS_USERNAME} - password: ${RDS_PASSWORD} \ No newline at end of file + password: ${RDS_PASSWORD} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 9d45440..ea57c6e 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,4 +1,6 @@ spring: + config: + import: "classpath:env.yml" profiles: include: rds,jwt,kakao jpa: