Skip to content

Commit

Permalink
chore: gradle.yml에 yml 파일 세팅 단계 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeyeon0130 committed Jul 28, 2024
1 parent 7795301 commit 94e4523
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
# pull_request:
# branches: [ "develop" ]

env:
RESOURCE_PATH: ./makar/src/main/resources/application.yaml

jobs:
build-with-gradle:
runs-on: ubuntu-22.04
Expand All @@ -25,18 +28,21 @@ jobs:
with:
java-version: '17'
distribution: 'corretto'
- name: gradlew에 실행 권한 부여
run: chmod +x ./gradlew
- name: 프로젝트 빌드
run: ./gradlew build
- name: yml 파일 세팅
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.RESOURCE_PATH }}
env:
ACCESS_TOKEN_EXP: ${{ secrets.ACCESS_TOKEN_EXP }}
REFRESH_TOKEN_EXP: ${{ secrets.REFRESH_TOKEN_EXP }}
ODSAY_API_KEY: ${{ secrets.ODSAY_API_KEY }}
DATASOURCE_URL: ${{ secrets.DATASOURCE_URL }}
DATASOURCE_USERNAME: ${{ secrets.DATASOURCE_USERNAME }}
DATASOURCE_PASSWORD: ${{ secrets.DATASOURCE_PASSWORD }}

- name: gradlew에 실행 권한 부여
run: chmod +x ./gradlew
- name: 프로젝트 빌드
run: ./gradlew build
- name: AWS credential 설정
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
30 changes: 0 additions & 30 deletions src/main/resources/application-prod.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
spring:
application:
name: makar

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${DATASOURCE_URL}
username: ${DATASOURCE_USERNAME}
password: ${DATASOURCE_PASSWORD}
sql:
init:
platform: mysql

jpa:
database-platform: org.hibernate.dialect.MySQLDialect
hibernate:
ddl-auto: update
generate-ddl: true
show-sql: true
properties:
hibernate:
format_sql: true
# dialect: org.hiberante.dialect.MySQL8Dialect

logging.level:
org.hibernate.SQL: debug

app:
jwt:
accessTokenValidMS: ${ACCESS_TOKEN_EXP}
Expand Down

0 comments on commit 94e4523

Please sign in to comment.