Skip to content

Commit

Permalink
Merge pull request #3 from DDD-Community/MARA-19
Browse files Browse the repository at this point in the history
MARA-19 : 개발 DB 연결
  • Loading branch information
jhkang1517 authored Jan 19, 2024
2 parents 392c528 + fbb612d commit 6764e11
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
S3_BUCKET_NAME: mara-s3bucket
RESOURCE_PATH: ./src/main/resources/application.yml
RESOURCE_PATH: ./src/main/resources/application-dev.yml
CODE_DEPLOY_APPLICATION_NAME: mara-code-deploy
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: mara-deploy-group

Expand All @@ -25,13 +25,14 @@ jobs:
java-version: 17

# [1]
# - name: Set yaml file
# uses: microsoft/variable-substitution@v1
# with:
# files: ${{ env.RESOURCE_PATH }}
# env:
## override.value: ${{ secrets.DI_FROM_SECRET }}
# override.value: 'from deploy.yaml'
- name: Set yml file
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.RESOURCE_PATH }}
env:
spring.datasource.url: ${{ secrets.DB_URL }}
spring.datasource.username: ${{ secrets.DB_USERNAME }}
spring.datasource.password: ${{ secrets.DB_PASSWORD }}

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
spring:
datasource:
url: ${url}
username: ${username}
password: ${password}
driver-class-name: org.mariadb.jdbc.Driver
2 changes: 1 addition & 1 deletion src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:h2:mem:test;MODE=MYSQL
url: jdbc:h2:mem:test;MODE=MariaDB
username: sa
driver-class-name: org.h2.Driver
h2:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:h2:mem:test;MODE=MYSQL
url: jdbc:h2:mem:test;MODE=MariaDB
username: sa
driver-class-name: org.h2.Driver
h2:
Expand Down

0 comments on commit 6764e11

Please sign in to comment.