From d517fd368189540e14cba1958a2e7a7b5e8b1f0b Mon Sep 17 00:00:00 2001 From: Parkjyun <98092394+Parkjyun@users.noreply.github.com> Date: Fri, 5 Jul 2024 07:58:31 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20yml=ED=8C=8C=EC=9D=BC=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EB=A5=BC=20=EC=9C=84=ED=95=9C=20submodule=20=EB=8F=84?= =?UTF-8?q?=EC=9E=85=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [chore] add submodule for yml * [chore] edit build.gradle to import yml from submodule * [chore] edit build.gradle to import yml from submodule * [chore] edit build.gradle to import yml from submodule * [chore] edit ci workflow to use submodule * [chore] edit cd workflow to use submodule * [chore] fix typo in workflows * [chore] fix typo in workflows --- .github/workflows/dev-cd.yml | 12 +++++------- .github/workflows/dev-ci.yml | 10 ++++------ .gitmodules | 3 +++ build.gradle | 8 ++++++++ server-yml | 1 + 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 .gitmodules create mode 160000 server-yml diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 8645d300..49cb599d 100644 --- a/.github/workflows/dev-cd.yml +++ b/.github/workflows/dev-cd.yml @@ -10,7 +10,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_SECRET }} + submodules: true - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -18,11 +21,6 @@ jobs: java-version: '17' distribution: 'corretto' - - name: create secret config file - run: | - cd src/main/resources - echo "${{ secrets.APPLICATION_DEV }}" > ./application-dev.yml - - name: build with gradle run: | chmod +x gradlew @@ -46,7 +44,7 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DEV_REPONAME }} CD: - needs: [CI] + needs: CI runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 03336497..9eb88ea9 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -10,7 +10,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_SECRET }} + submodules: true - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -18,11 +21,6 @@ jobs: java-version: '17' distribution: 'corretto' - - name: create secret config file - run: | - cd src/main/resources - echo "${{ secrets.APPLICATION_DEV }}" > ./application-dev.yml - - name: build with gradle run: | chmod +x gradlew diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..573169e7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "server-yml"] + path = server-yml + url = https://github.com/Team-Hankki/server-yml.git diff --git a/build.gradle b/build.gradle index d8f5889e..59c48be5 100644 --- a/build.gradle +++ b/build.gradle @@ -49,3 +49,11 @@ dependencies { tasks.named('test') { useJUnitPlatform() } + +tasks.register('copyYml', Copy) { + copy { + from './server-yml' + include "*.yml" + into 'src/main/resources' + } +} diff --git a/server-yml b/server-yml new file mode 160000 index 00000000..a7d6b4d4 --- /dev/null +++ b/server-yml @@ -0,0 +1 @@ +Subproject commit a7d6b4d403c4c09d3c0db99b1187d0d8bcc1f850