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}