Skip to content

Commit

Permalink
[chore] yml파일 생성 순서 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ehs208 committed Dec 27, 2024
1 parent 596aef6 commit b64060b
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ jobs:
java-version: '17'
distribution: 'temurin'

# 환경별 yml 파일 생성(1) - application.yml
- name: make application.yml
if: |
contains(github.ref, 'dev')
run: |
mkdir ./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

# 환경별 yml 파일 생성(2) - dev
- name: make application-dev.yml
if: contains(github.ref, 'dev')
run: |
cd ./src/main/resources
touch ./application-dev.yml
echo "${{ secrets.YML_DEV }}" > ./application-dev.yml
shell: bash
- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -41,26 +60,6 @@ jobs:
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_USER_NAME }}/eatmate

# 환경별 yml 파일 생성(1) - application.yml
- name: make application.yml
if: |
contains(github.ref, 'dev')
run: |
mkdir ./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

# 환경별 yml 파일 생성(2) - dev
- name: make application-dev.yml
if: contains(github.ref, 'dev')
run: |
cd ./src/main/resources
touch ./application-dev.yml
echo "${{ secrets.YML_DEV }}" > ./application-dev.yml
shell: bash

deploy:
runs-on: ubuntu-latest
needs: build
Expand Down

0 comments on commit b64060b

Please sign in to comment.