From 94e45235a457d82e909b8337b0cf27b6e94f07aa Mon Sep 17 00:00:00 2001 From: chaeyeon0130 Date: Mon, 29 Jul 2024 00:48:26 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20gradle.yml=EC=97=90=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=84=B8=ED=8C=85=20=EB=8B=A8=EA=B3=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 16 +++++++++---- src/main/resources/application-prod.yaml | 30 ------------------------ src/main/resources/application.yaml | 27 +++++++++++++++++++++ 3 files changed, 38 insertions(+), 35 deletions(-) delete mode 100644 src/main/resources/application-prod.yaml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dc476ad..49163af 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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 @@ -25,10 +28,10 @@ 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 }} @@ -36,7 +39,10 @@ jobs: 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: diff --git a/src/main/resources/application-prod.yaml b/src/main/resources/application-prod.yaml deleted file mode 100644 index 161b333..0000000 --- a/src/main/resources/application-prod.yaml +++ /dev/null @@ -1,30 +0,0 @@ -spring: - config: - activate: - on-profile: prod - - 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 \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index b1f5f73..ac24c43 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -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}