diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 747bbec..4befa03 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -34,16 +34,14 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - # 환경별 yml 파일 생성(1) - application.yml - - name: make application.yml - if: | - contains(github.ref, 'dev') - run: | - mkdir -p ./src/main/resources # resources 폴더 생성 - cd ./src/main/resources # resources 폴더로 이동 - touch ./application.yml # application.yml 생성 - echo "${{ secrets.YML }}" > ./application.yml # github actions에서 설정한 값을 application.yml 파일에 쓰기 - shell: bash + - name: Set yml file + uses: microsoft/variable-substitution@v1 + with: + files: 'src/main/resources/application.yml' + env: + spring.datasource.url: ${{ secrets.MYSQL_URL }} + spring.datasource.username: ${{ secrets.MYSQL_USER }} + spring.datasource.password: ${{ secrets.MYSQL_PW }} # 환경별 yml 파일 생성(2) - dev #- name: make application-dev.yml