From 292fb24a973a9b497a6f066017db8b647b3cd532 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:38:24 +0900 Subject: [PATCH 01/30] =?UTF-8?q?[Fix]=20Gradle.yml=20=EA=B6=8C=ED=95=9C?= =?UTF-8?q?=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e9c5021..dde37db 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,9 @@ name: Deploy on: push: - branches: [ "develop" ] + branches: [ "ci/cd" ] pull_request: - branches: [ "develop" ] + branches: [ "ci/cd" ] permissions: contents: read @@ -26,11 +26,9 @@ jobs: java-version: '17' distribution: 'temurin' - # Gradle 버전 설치 (Wrapper 없을 경우) - - name: Set up Gradle - uses: gradle/wrapper-validation-action@v2 - with: - gradle-version: '8.8' # 필요한 Gradle 버전 설정 + # Gradlew 실행 허용 + - name: Grant execute permission for gradlew + run: chmod +x ./wabi/gradlew # 환경 변수 설정 - name: Set environment values @@ -47,4 +45,4 @@ jobs: # Gradle build (Test 제외) - name: Build with Gradle - run: ./wabi/gradlew clean build -x test # Gradle Wrapper로 빌드 + run: ./wabi/gradlew clean build -x test From 667704826974c8b7e2b18af3b9a6615875066df5 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:41:29 +0900 Subject: [PATCH 02/30] Update gradle.yml --- .github/workflows/gradle.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dde37db..4d2fc12 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,9 @@ name: Deploy on: push: - branches: [ "ci/cd" ] + branches: [ "develop" ] pull_request: - branches: [ "ci/cd" ] + branches: [ "develop" ] permissions: contents: read @@ -46,3 +46,4 @@ jobs: # Gradle build (Test 제외) - name: Build with Gradle run: ./wabi/gradlew clean build -x test + working-directory: ./wabi # Gradle 빌드를 wabi 폴더 내에서 실행 From 29c12c334ced7e2b56c079fa34a7b39a27e58639 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:45:53 +0900 Subject: [PATCH 03/30] Update gradle.yml From 8c82f1bd3461b953829f85927dfdbc4c5936ad36 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:46:18 +0900 Subject: [PATCH 04/30] Update gradle.yml --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4d2fc12..bbc9cac 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -47,3 +47,4 @@ jobs: - name: Build with Gradle run: ./wabi/gradlew clean build -x test working-directory: ./wabi # Gradle 빌드를 wabi 폴더 내에서 실행 + From c784fac6d6c0a21c7e36fb9a1fe46089ac576290 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:48:04 +0900 Subject: [PATCH 05/30] Update gradle.yml --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index bbc9cac..3f0e8f9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,9 @@ name: Deploy on: push: - branches: [ "develop" ] + branches: [ "ci/cd" ] pull_request: - branches: [ "develop" ] + branches: [ "ci/cd" ] permissions: contents: read From 63a5c077e2df6fd72685ca68a876948ade325429 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:50:16 +0900 Subject: [PATCH 06/30] Update gradle.yml --- .github/workflows/gradle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3f0e8f9..48e86fc 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,8 +33,7 @@ jobs: # 환경 변수 설정 - name: Set environment values run: | - cd ./wabi/src/main/resources - touch ./env.properties + touch ./wabi/src/main/resources/env.properties echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" >> ./env.properties echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> ./env.properties echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> ./env.properties From 2f97c78a355e49a5197b38987bac9ef18e5d3979 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:52:40 +0900 Subject: [PATCH 07/30] =?UTF-8?q?fix:=20Github=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 48e86fc..1b81758 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -18,6 +18,9 @@ jobs: # 기본 체크아웃 - name: Checkout uses: actions/checkout@v3 + # 폴더 정보 확인 + - name: List the repository structure + run: ls -R # JDK 17 세팅 - name: Set up JDK 17 From 4b22ef37f5f93925480881d9ec0aa2225ff29130 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:54:32 +0900 Subject: [PATCH 08/30] =?UTF-8?q?[Fix]=20GithubAction=20working-directory?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1b81758..1e983e7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -48,5 +48,4 @@ jobs: # Gradle build (Test 제외) - name: Build with Gradle run: ./wabi/gradlew clean build -x test - working-directory: ./wabi # Gradle 빌드를 wabi 폴더 내에서 실행 From 8a37dd9aec36136c18c32752a74b10b33112a119 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:56:41 +0900 Subject: [PATCH 09/30] =?UTF-8?q?fix:=20GithubAction=20=EB=B9=8C=EB=93=9C?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1e983e7..81b8ae8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -47,5 +47,7 @@ jobs: # Gradle build (Test 제외) - name: Build with Gradle - run: ./wabi/gradlew clean build -x test + run: | + ls + ./wabi/gradlew clean build -x test From f36b15a8045865d36cdc54aad4d0590bb84614bb Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 17:58:29 +0900 Subject: [PATCH 10/30] =?UTF-8?q?fix:=20GithubAction=20=EB=B9=8C=EB=93=9C?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 81b8ae8..917c237 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -49,5 +49,7 @@ jobs: - name: Build with Gradle run: | ls - ./wabi/gradlew clean build -x test + cd wabi + ls + ./gradlew clean build -x test From 7d9bdcbd315c02dec1f522ebd95af6a91dd87df2 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:11:58 +0900 Subject: [PATCH 11/30] =?UTF-8?q?feat:=20GihubActions=20Docker=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..89bce03 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,27 @@ +name: Docker Image CI + +on: + push: + branches: [ "ci/cd" ] + pull_request: + branches: [ "ci/cd" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: clean build -x test + + # Docker build + - name: Docker build + run: | + docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} + docker build -t seongwonyoon/wabi . + docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} + docker push seongwonyoon/wabi:${GITHUB_SHA::7} From 89feb7250ad1a7197ed326730fc3d9f13d21d191 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:14:47 +0900 Subject: [PATCH 12/30] =?UTF-8?q?feat:=20gradle.yml=EC=97=90=20Docker=20bu?= =?UTF-8?q?ild=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 917c237..51e1a9b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -52,4 +52,13 @@ jobs: cd wabi ls ./gradlew clean build -x test + + - name: Docker build + run: | + docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} + docker build -t seongwonyoon/wabi . + docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} + docker push seongwonyoon/wabi:${GITHUB_SHA::7} + + From 6786159a3dc5771bdf4601cb2b99a7730cb8edf2 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:19:08 +0900 Subject: [PATCH 13/30] =?UTF-8?q?fix:=20GithubActions=20Dockerhub=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 51e1a9b..44d8cc7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -55,7 +55,7 @@ jobs: - name: Docker build run: | - docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} docker build -t seongwonyoon/wabi . docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} docker push seongwonyoon/wabi:${GITHUB_SHA::7} From 606aac44bfc4724155a8a30deb6858a3c10e3556 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:22:21 +0900 Subject: [PATCH 14/30] =?UTF-8?q?fix:=20GithubActions=20Docker=20build=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 44d8cc7..6fe1259 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -56,6 +56,7 @@ jobs: - name: Docker build run: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + cd wabi docker build -t seongwonyoon/wabi . docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} docker push seongwonyoon/wabi:${GITHUB_SHA::7} From d7a855024df806970a0aa573ef1288bbd5d9aff0 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:27:29 +0900 Subject: [PATCH 15/30] =?UTF-8?q?fix:=20GithubActions=20Docker=20build=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6fe1259..2b6ab6d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -57,9 +57,10 @@ jobs: run: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} cd wabi - docker build -t seongwonyoon/wabi . - docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} - docker push seongwonyoon/wabi:${GITHUB_SHA::7} + docker build -t seongwonyoon/wabi:latest . # 이미지에 latest 태그를 추가 + docker tag seongwonyoon/wabi:latest seongwonyoon/wabi:${GITHUB_SHA::7} # GITHUB_SHA를 이용한 커밋 태그 추가 + docker push seongwonyoon/wabi:latest # latest 버전 푸시 + docker push seongwonyoon/wabi:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 From 3617540299754fa7e7d9eb380c3fad453ee0794e Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:49:55 +0900 Subject: [PATCH 16/30] =?UTF-8?q?feat:=20GithubActions=20Docker=20ssh=20?= =?UTF-8?q?=EC=A0=91=EC=86=8D=20=EB=B0=8F=20pull=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2b6ab6d..9d7fbad 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -57,10 +57,24 @@ jobs: run: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} cd wabi - docker build -t seongwonyoon/wabi:latest . # 이미지에 latest 태그를 추가 - docker tag seongwonyoon/wabi:latest seongwonyoon/wabi:${GITHUB_SHA::7} # GITHUB_SHA를 이용한 커밋 태그 추가 - docker push seongwonyoon/wabi:latest # latest 버전 푸시 - docker push seongwonyoon/wabi:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 - + docker build -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest . # 이미지에 latest 태그를 추가 + docker tag ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest seongwonyoon/wabi:${GITHUB_SHA::7} # GITHUB_SHA를 이용한 커밋 태그 추가 + docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest # latest 버전 푸시 + docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 + + # Deploy + - name: Deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SERVER_IP }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} + envs: GITHUB_SHA + script: | + sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} + sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} + sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} + sudo docker-compose up -d From cafb6b32520c14cb556b64962ce37bedcb1c8d16 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:50:58 +0900 Subject: [PATCH 17/30] =?UTF-8?q?fix:=20deploy.yml=20=EB=AC=B8=EB=B2=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9d7fbad..860db79 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -62,7 +62,7 @@ jobs: docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest # latest 버전 푸시 docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 - # Deploy + # Deploy - name: Deploy uses: appleboy/ssh-action@master with: From 081acddab20673d2c6165ec82560e067a19fc1f2 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 18:54:28 +0900 Subject: [PATCH 18/30] =?UTF-8?q?fix:=20Dockerhub=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EB=94=94=20=EB=B0=8F=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?secret=20=EB=A7=A4=EC=B9=AD=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 860db79..25c9d79 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -55,12 +55,12 @@ jobs: - name: Docker build run: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} cd wabi - docker build -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest . # 이미지에 latest 태그를 추가 - docker tag ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest seongwonyoon/wabi:${GITHUB_SHA::7} # GITHUB_SHA를 이용한 커밋 태그 추가 - docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest # latest 버전 푸시 - docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 + docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:latest . # 이미지에 latest 태그를 추가 + docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:latest seongwonyoon/wabi:${GITHUB_SHA::7} # GITHUB_SHA를 이용한 커밋 태그 추가 + docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:latest # latest 버전 푸시 + docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} # 커밋 해시 버전 푸시 # Deploy - name: Deploy From 7ffba5324960cb98409a40deab439d3b9c8dbe54 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 19:40:56 +0900 Subject: [PATCH 19/30] =?UTF-8?q?feat:=20=EC=9B=B9=EC=96=B4=ED=94=8C=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=EC=97=90=20env=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 25c9d79..5d3ff33 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -75,6 +75,14 @@ jobs: sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} + sudo echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env + sudo echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env + sudo echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env + sudo echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env + sudo echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env + sudo echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env + sudo echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env + sudo echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env sudo docker-compose up -d From 4571d4fbc3badb6387f091a96277479107bdfd74 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 19:47:16 +0900 Subject: [PATCH 20/30] =?UTF-8?q?fix:=20=EC=9B=B9=EC=96=B4=ED=94=8C?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20pull=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=EB=8A=A5=ED=95=9C=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5d3ff33..12d8b21 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -73,8 +73,7 @@ jobs: envs: GITHUB_SHA script: | sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} - sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} - sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} + sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} sudo echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env sudo echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env sudo echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env From 49b80e6eb8b171a128c82bf43ef9f0b133dbfdfb Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 19:54:26 +0900 Subject: [PATCH 21/30] =?UTF-8?q?fix:=20echo=20=EC=BB=A4=EB=A7=A8=EB=93=9C?= =?UTF-8?q?=20sudo=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 12d8b21..d95af48 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -74,14 +74,14 @@ jobs: script: | sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} - sudo echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env - sudo echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env - sudo echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env - sudo echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env - sudo echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env - sudo echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env - sudo echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env - sudo echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env + echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env + echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env + echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env + echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env + echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env + echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env + echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env + echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env sudo docker-compose up -d From f7783b8baa72a9f7ec9cc85942aa85ae37a2dd81 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:00:28 +0900 Subject: [PATCH 22/30] =?UTF-8?q?fix:=20=EC=84=9C=EB=B2=84=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d95af48..937395d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -72,6 +72,8 @@ jobs: passphrase: ${{ secrets.SSH_PASSPHRASE }} envs: GITHUB_SHA script: | + ls + cd ~ sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env @@ -83,5 +85,6 @@ jobs: echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env sudo docker-compose up -d + From 3ed768aaee7d66768d9701d10a5d42a5a623bf80 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:26:03 +0900 Subject: [PATCH 23/30] =?UTF-8?q?fix:=20docker-compose=20down=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 937395d..dad2911 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -84,6 +84,8 @@ jobs: echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env + + sudo docker-compose down sudo docker-compose up -d From a5e6f3e6fa225ba6cfde3b980c2fbb42abe7a659 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:30:01 +0900 Subject: [PATCH 24/30] =?UTF-8?q?fix:=20docker-compose=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dad2911..16f35c4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -76,17 +76,23 @@ jobs: cd ~ sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} - echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env - echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env - echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env - echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env - echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env - echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env - echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env - echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> .env + + # Create .env file in the correct directory + echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > ~/wabi/.env + echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> ~/wabi/.env + echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> ~/wabi/.env + echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> ~/wabi/.env + echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> ~/wabi/.env + echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> ~/wabi/.env + echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> ~/wabi/.env + echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> ~/wabi/.env + + # Navigate to the correct directory for docker-compose + cd ~/wabi + # Bring down any existing containers before bringing up new ones sudo docker-compose down - sudo docker-compose up -d + sudo docker-compose up -d From 872499957105c41039ec6b4065cdd555ae91fb29 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:36:43 +0900 Subject: [PATCH 25/30] =?UTF-8?q?fix:=20docker-compose.yml=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B0=8D=EC=96=B4=EB=B3=B4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 16f35c4..c3adbc3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -78,21 +78,22 @@ jobs: sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} # Create .env file in the correct directory - echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > ~/wabi/.env - echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> ~/wabi/.env - echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> ~/wabi/.env - echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> ~/wabi/.env - echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> ~/wabi/.env - echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> ~/wabi/.env - echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> ~/wabi/.env - echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> ~/wabi/.env + echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env + echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env + echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env + echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env + echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env + echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env + echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env + echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> - # Navigate to the correct directory for docker-compose - cd ~/wabi - - # Bring down any existing containers before bringing up new ones - sudo docker-compose down - sudo docker-compose up -d + if [ -f "docker-compose.yml" ]; then + sudo docker-compose down + sudo docker-compose up -d + else + echo "docker-compose.yml not found in the current directory." + exit 1 + fi From f09652337e3a08a379cba5a1c5b59fb21b00af99 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:41:36 +0900 Subject: [PATCH 26/30] =?UTF-8?q?fix:=20=EC=84=9C=EB=B2=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20bash=EB=A1=9C=20=EC=BB=A4=EB=A7=A8=EB=93=9C=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c3adbc3..ff8a5c7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -72,6 +72,7 @@ jobs: passphrase: ${{ secrets.SSH_PASSPHRASE }} envs: GITHUB_SHA script: | + #!/bin/bash ls cd ~ sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} From 9e09ed39a5790e7d8e983c9ccf10e4a1c72f42c5 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:44:58 +0900 Subject: [PATCH 27/30] =?UTF-8?q?fix:=20docker-compose.yml=20=EB=A3=A8?= =?UTF-8?q?=ED=8A=B8=20=ED=8F=B4=EB=8D=94=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ff8a5c7..a86f892 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -74,7 +74,7 @@ jobs: script: | #!/bin/bash ls - cd ~ + cd / sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} From 5a2e110145beed6409534a4b525d4264ba949cc0 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:48:11 +0900 Subject: [PATCH 28/30] =?UTF-8?q?fix:=20echo=20=EC=BB=A4=EB=A7=A8=EB=93=9C?= =?UTF-8?q?=20sudo=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a86f892..fcf61c0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -79,14 +79,14 @@ jobs: sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} # Create .env file in the correct directory - echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env - echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env - echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env - echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env - echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env - echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env - echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env - echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> + sudo echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env + sudo echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env + sudo echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env + sudo echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env + sudo echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env + sudo echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env + sudo echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env + sudo echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> if [ -f "docker-compose.yml" ]; then sudo docker-compose down From 77cb3f5b83adb912ebcb12345dda53c61eaaa2d7 Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 20:52:36 +0900 Subject: [PATCH 29/30] =?UTF-8?q?fix:=20echo=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fcf61c0..5cc4a52 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -79,22 +79,17 @@ jobs: sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }} # Create .env file in the correct directory - sudo echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" > .env - sudo echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> .env - sudo echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> .env - sudo echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> .env - sudo echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> .env - sudo echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" >> .env - sudo echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> .env - sudo echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" >> + echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" | sudo tee -a .env > /dev/null + echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" | sudo tee -a .env > /dev/null + echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" | sudo tee -a .env > /dev/null + echo "JWT_KEY=${{ secrets.JWT_KEY }}" | sudo tee -a .env > /dev/null + echo "JWT_EXPIRATION_HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" | sudo tee -a .env > /dev/null + echo "JWT_ISSUER=${{ secrets.JWT_ISSUER }}" | sudo tee -a .env > /dev/null + echo "DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" | sudo tee -a .env > /dev/null + echo "DOCKERHUB_REPOSITORY=${{ secrets.DOCKERHUB_REPOSITORY }}" | sudo tee -a .env > /dev/null - if [ -f "docker-compose.yml" ]; then - sudo docker-compose down - sudo docker-compose up -d - else - echo "docker-compose.yml not found in the current directory." - exit 1 - fi + sudo docker-compose down + sudo docker-compose up -d From f77d0bf9541fd7172ca18a85e77c93a552f57f1e Mon Sep 17 00:00:00 2001 From: SeongWonYoon Date: Mon, 2 Dec 2024 21:03:44 +0900 Subject: [PATCH 30/30] =?UTF-8?q?fix:=20develop=20merge=EB=A5=BC=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=EB=B8=8C=EB=9E=9C=EC=B9=98=EB=AA=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5cc4a52..77b011c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,9 @@ name: Deploy on: push: - branches: [ "ci/cd" ] + branches: [ "develop" ] pull_request: - branches: [ "ci/cd" ] + branches: [ "develop" ] permissions: contents: read