diff --git a/.github/workflows/deploy-ecs.yml b/.github/workflows/deploy-ecs.yml index 17148f61..fe66700a 100644 --- a/.github/workflows/deploy-ecs.yml +++ b/.github/workflows/deploy-ecs.yml @@ -33,14 +33,12 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Set Yaml - uses: microsoft/variable-substitution@v1 - with: - files: ./src/main/resources/application-dev.yml + - name: Copy Secret env: - spring.datasource.url: ${{ secrets.DATASOURCE_URL }} - spring.datasource.username: ${{ secrets.DATASOURCE_USERNAME }} - spring.datasource.password: ${{ secrets.DATASOURCE_PASSWORD }} + CREATE_SECRET: ${{secrets.DAITSSU_DEV_APPLICATION_YML}} + CREATE_SECRET_DIR: common/src/main/resources + CREATE_SECRET_DIR_FILE_NAME: application-dev.yml + run: echo $CREATE_SECRET > $CREATE_SECRET_DIR/$CREATE_SECRET_DIR_FILE_NAME - name: Build with Gradle run: ./gradlew common:bootJar diff --git a/common/src/main/resources/application-local.yml b/common/src/main/resources/application-local.yml new file mode 100644 index 00000000..d2e9ad9f --- /dev/null +++ b/common/src/main/resources/application-local.yml @@ -0,0 +1,6 @@ +spring: + datasource: + driver-class-name: org.postgresql.Driver + url: ${DATASOURCE_URL} + username: ${DATASOURCE_USERNAME} + password: ${DATASOURCE_PASSWORD} \ No newline at end of file diff --git a/common/src/main/resources/application.yml b/common/src/main/resources/application.yml index 76ccbda7..dd99829d 100644 --- a/common/src/main/resources/application.yml +++ b/common/src/main/resources/application.yml @@ -1,7 +1,5 @@ # Common Module application.yml spring: - datasource: - driver-class-name: org.postgresql.Driver jpa: properties: hibernate: