From efc6c024df3593c13ee19197d344c859038a4bc9 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 06:21:35 +0900 Subject: [PATCH 1/8] [chore] add submodule for yml --- .gitmodules | 3 +++ server-yml | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 server-yml 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/server-yml b/server-yml new file mode 160000 index 00000000..a7d6b4d4 --- /dev/null +++ b/server-yml @@ -0,0 +1 @@ +Subproject commit a7d6b4d403c4c09d3c0db99b1187d0d8bcc1f850 From 32f66a54e66200aafb875f05e4ef75de037faff6 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 06:23:59 +0900 Subject: [PATCH 2/8] [chore] edit build.gradle to import yml from submodule --- build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index d8f5889e..873bd9df 100644 --- a/build.gradle +++ b/build.gradle @@ -49,3 +49,11 @@ dependencies { tasks.named('test') { useJUnitPlatform() } + +task copyPrivate(type: Copy) { + copy { + from './server-yml' + include "*.yml" + into 'src/main/resources' + } +} \ No newline at end of file From c323b4c5091416be4f252b8cf59b45ed6349cce2 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:22:31 +0900 Subject: [PATCH 3/8] [chore] edit build.gradle to import yml from submodule --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 873bd9df..0b011db3 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ tasks.named('test') { useJUnitPlatform() } -task copyPrivate(type: Copy) { +tasks.register('copyYml', Copy) { copy { from './server-yml' include "*.yml" From 9dda9b9efcccfc650f53d113d1cc9ab67c5180d2 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:44:25 +0900 Subject: [PATCH 4/8] [chore] edit build.gradle to import yml from submodule --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0b011db3..59c48be5 100644 --- a/build.gradle +++ b/build.gradle @@ -56,4 +56,4 @@ tasks.register('copyYml', Copy) { include "*.yml" into 'src/main/resources' } -} \ No newline at end of file +} From f24b77beab3640c18e003f590385f41834abff30 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:44:47 +0900 Subject: [PATCH 5/8] [chore] edit ci workflow to use submodule --- .github/workflows/dev-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 03336497..6583c056 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -10,18 +10,21 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + token: ${{GIT_SECRET}} + submodules: true - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' distribution: 'corretto' - - - name: create secret config file - run: | - cd src/main/resources - echo "${{ secrets.APPLICATION_DEV }}" > ./application-dev.yml + - name: Checkout repo + uses: actions/checkout@v4 + with: + token: ${{GIT_SECRET}} + submodules: true - name: build with gradle run: | From 02289b9d74cb804258cbe502629cbe7864916c5b Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:44:51 +0900 Subject: [PATCH 6/8] [chore] edit cd workflow to use submodule --- .github/workflows/dev-cd.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 8645d300..66287c4f 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: ${{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: From a4bf6c894660d3ebf207de85fc4a7e20d96810c9 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:51:45 +0900 Subject: [PATCH 7/8] [chore] fix typo in workflows --- .github/workflows/dev-cd.yml | 2 +- .github/workflows/dev-ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 66287c4f..1f6a05b8 100644 --- a/.github/workflows/dev-cd.yml +++ b/.github/workflows/dev-cd.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{GIT_SECRET}} + token: ${{ GIT_SECRET }} submodules: true - name: Set up JDK 17 diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 6583c056..41f450c1 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{GIT_SECRET}} + token: ${{ GIT_SECRET }} submodules: true - name: Set up JDK 17 @@ -23,7 +23,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: - token: ${{GIT_SECRET}} + token: ${{ GIT_SECRET }} submodules: true - name: build with gradle From 114ccafad302ed913c5de775f4c8d37fe97b27fb Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Fri, 5 Jul 2024 07:56:02 +0900 Subject: [PATCH 8/8] [chore] fix typo in workflows --- .github/workflows/dev-cd.yml | 2 +- .github/workflows/dev-ci.yml | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 1f6a05b8..49cb599d 100644 --- a/.github/workflows/dev-cd.yml +++ b/.github/workflows/dev-cd.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{ GIT_SECRET }} + token: ${{ secrets.GIT_SECRET }} submodules: true - name: Set up JDK 17 diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 41f450c1..9eb88ea9 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{ GIT_SECRET }} + token: ${{ secrets.GIT_SECRET }} submodules: true - name: Set up JDK 17 @@ -20,11 +20,6 @@ jobs: with: java-version: '17' distribution: 'corretto' - - name: Checkout repo - uses: actions/checkout@v4 - with: - token: ${{ GIT_SECRET }} - submodules: true - name: build with gradle run: |