From 27068de9e9059f8f438154ac73a4aedd76761a1a Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:30:31 +0900 Subject: [PATCH 01/17] =?UTF-8?q?[feat]=20CI.yml=20=EC=B4=88=EA=B8=B0=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..01c6423 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,81 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + # 4. Build 및 Jacoco 리포트 생성 + - name: Build and Test with Jacoco + run: ./gradlew clean build test jacocoTestReport + + # 5. Jacoco HTML 리포트를 GitHub Actions Artifacts로 업로드 + - name: Upload Jacoco Report as Artifact + uses: actions/upload-artifact@v3 + with: + name: jacoco-report + path: build/reports/jacoco/test/html + + # 6. 테스트 결과 아티팩트 업로드 + - name: Upload Test Reports + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: build/reports/tests/test + + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). + # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. + # + # - name: Setup Gradle + # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + # with: + # gradle-version: '8.9' + # + # - name: Build with Gradle 8.9 + # run: gradle build + + # dependency-submission: + + # runs-on: ubuntu-latest + # permissions: + # contents: write + + # steps: + # - uses: actions/checkout@v4 + # - name: Set up JDK 17 + # uses: actions/setup-java@v4 + # with: + # java-version: '17' + # distribution: 'temurin' + + # # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. + # # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md + # - name: Generate and submit dependency graph + # uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 From ff8b8db75ad5c633ef57dd15988956c558237e84 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:24:25 +0900 Subject: [PATCH 02/17] =?UTF-8?q?feat=20:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=8F=AC=ED=95=A8=20=EB=B9=8C=EB=93=9C,=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EA=B2=B0=EA=B3=BC=20=EC=B6=94=EC=B6=9C,=20?= =?UTF-8?q?=EB=8F=84=EC=BB=A4=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EB=B0=8F=20=ED=91=B8=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 74 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 01c6423..d0b54b0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,25 +31,89 @@ jobs: # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - name: Setup Gradle uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 - - # 4. Build 및 Jacoco 리포트 생성 + + # 1. application.yml 생성 + - name: Create application.yml + run: | + mkdir -p src/main/resources + touch src/main/resources/application.yml + echo "server:" >> src/main/resources/application.yml + echo " port: 8080" >> src/main/resources/application.yml + + echo "spring:" >> src/main/resources/application.yml + echo " datasource:" >> src/main/resources/application.yml + echo " driver-class-name: com.mysql.cj.jdbc.Driver" >> src/main/resources/application.yml + echo " url: '${{ secrets.DB_URL }}'" >> src/main/resources/application.yml + echo " username: '${{ secrets.DB_USERNAME }}'" >> src/main/resources/application.yml + echo " password: '${{ secrets.DB_PASSWORD }}'" >> src/main/resources/application.yml + + echo " data:" >> src/main/resources/application.yml + echo " redis:" >> src/main/resources/application.yml + echo " host: '${{ secrets.REDIS_HOST }}'" >> src/main/resources/application.yml + echo " port: ${ { secrets.REDIS_PORT }}" >> src/main/resources/application.yml + + echo " jpa:" >> src/main/resources/application.yml + echo " hibernate:" >> src/main/resources/application.yml + echo " ddl-auto: none" >> src/main/resources/application.yml + echo " show-sql: true" >> src/main/resources/application.yml + echo " properties:" >> src/main/resources/application.yml + echo " hibernate:" >> src/main/resources/application.yml + echo " dialect: org.hibernate.dialect.MySQLDialect" >> src/main/resources/application.yml + echo " format_sql: true" >> src/main/resources/application.yml + + echo " mail:" >> src/main/resources/application.yml + echo " host: smtp.gmail.com" >> src/main/resources/application.yml + echo " port: 587" >> src/main/resources/application.yml + echo " username: '${{ secrets.MAIL_USERNAME }}'" >> src/main/resources/application.yml + echo " password: '${{ secrets.MAIL_PASSWORD }}'" >> src/main/resources/application.yml + echo " properties:" >> src/main/resources/application.yml + echo " mail.smtp.auth: true" >> src/main/resources/application.yml + echo " mail.smtp.starttls.enable: true" >> src/main/resources/application.yml + + echo "jwt:" >> src/main/resources/application.yml + echo " secret: '${{ secrets.JWT_SECRET }}'" >> src/main/resources/application.yml + + echo "kakao:" >> src/main/resources/application.yml + echo " api:" >> src/main/resources/application.yml + echo " key: '${{ secrets.KAKAO_API_KEY }}'" >> src/main/resources/application.yml + echo "application.yml 생성 완료" + + # 2. Build 및 Jacoco 리포트 생성 - name: Build and Test with Jacoco run: ./gradlew clean build test jacocoTestReport - # 5. Jacoco HTML 리포트를 GitHub Actions Artifacts로 업로드 + # 3. Jacoco HTML 리포트를 GitHub Actions Artifacts로 업로드 - name: Upload Jacoco Report as Artifact uses: actions/upload-artifact@v3 with: name: jacoco-report path: build/reports/jacoco/test/html - # 6. 테스트 결과 아티팩트 업로드 + # 4. 테스트 결과 아티팩트 업로드 - name: Upload Test Reports uses: actions/upload-artifact@v3 with: name: test-reports path: build/reports/tests/test - + + # 5. Docker Hub 로그인 + - name: Docker Hub 로그인 + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # 6. Docker 이미지를 빌드하고 푸시하는 작업입니다. + - name: Build and Push Docker Image + env: + DOCKERHUB_USERNAME: tmdfl36 + IMAGE_NAME: mapjiri + TAG: latest + run: | + docker buildx build --platform linux/amd64 -t $DOCKERHUB_USERNAME/$IMAGE_NAME:$TAG . + docker push $DOCKERHUB_USERNAME/$IMAGE_NAME:$TAG + + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. # From 1ec40fc9d3a2b959f713916b332b32cb1a2fea81 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:30:02 +0900 Subject: [PATCH 03/17] =?UTF-8?q?chore=20:=20GitHub=20Actions=20Artifacts?= =?UTF-8?q?=20=EB=B2=84=EC=A0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d0b54b0..b702c52 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -84,7 +84,7 @@ jobs: # 3. Jacoco HTML 리포트를 GitHub Actions Artifacts로 업로드 - name: Upload Jacoco Report as Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jacoco-report path: build/reports/jacoco/test/html From c7f731c0c95933e133f273487db38c6f4b2655bf Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:32:09 +0900 Subject: [PATCH 04/17] =?UTF-8?q?chore=20:=20GitHub=20Actions=20Artifacts?= =?UTF-8?q?=20=EB=B2=84=EC=A0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b702c52..b5826a8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -91,7 +91,7 @@ jobs: # 4. 테스트 결과 아티팩트 업로드 - name: Upload Test Reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-reports path: build/reports/tests/test From 10c4c84c0ece81a5a18eea8f27870cb5c75746db Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:35:30 +0900 Subject: [PATCH 05/17] =?UTF-8?q?fix=20:=20redishost=20=ED=99=98=EA=B2=BD?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b5826a8..938e8e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,7 @@ jobs: echo " data:" >> src/main/resources/application.yml echo " redis:" >> src/main/resources/application.yml echo " host: '${{ secrets.REDIS_HOST }}'" >> src/main/resources/application.yml - echo " port: ${ { secrets.REDIS_PORT }}" >> src/main/resources/application.yml + echo " port: ${{ secrets.REDIS_PORT }}" >> src/main/resources/application.yml echo " jpa:" >> src/main/resources/application.yml echo " hibernate:" >> src/main/resources/application.yml From 81a1f7f9a55ff6835d75c6921e4d1255b730be6f Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:49:03 +0900 Subject: [PATCH 06/17] =?UTF-8?q?fix=20:=20=EC=98=A4=ED=83=80=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/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 938e8e6..d8479e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,7 @@ jobs: echo " data:" >> src/main/resources/application.yml echo " redis:" >> src/main/resources/application.yml echo " host: '${{ secrets.REDIS_HOST }}'" >> src/main/resources/application.yml - echo " port: ${{ secrets.REDIS_PORT }}" >> src/main/resources/application.yml + echo " port: '${{ secrets.REDIS_PORT }}'" >> src/main/resources/application.yml echo " jpa:" >> src/main/resources/application.yml echo " hibernate:" >> src/main/resources/application.yml From ca5f0b8a5ea4e78e91a8e2d266532d718db5348a Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:07:49 +0900 Subject: [PATCH 07/17] =?UTF-8?q?fix=20:=20=20=ED=8F=AC=ED=8A=B8=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EC=88=AB=EC=9E=90=EB=A1=9C=20=EC=9D=B8=EC=8B=9D?= =?UTF-8?q?=ED=95=98=EA=B2=8C=20=ED=98=95=EC=8B=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/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d8479e6..938e8e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,7 @@ jobs: echo " data:" >> src/main/resources/application.yml echo " redis:" >> src/main/resources/application.yml echo " host: '${{ secrets.REDIS_HOST }}'" >> src/main/resources/application.yml - echo " port: '${{ secrets.REDIS_PORT }}'" >> src/main/resources/application.yml + echo " port: ${{ secrets.REDIS_PORT }}" >> src/main/resources/application.yml echo " jpa:" >> src/main/resources/application.yml echo " hibernate:" >> src/main/resources/application.yml From 49be80c9433447eeb734c5134794e445c16678d5 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:20:20 +0900 Subject: [PATCH 08/17] =?UTF-8?q?chore=20:=20yml=20=ED=99=95=EC=9D=B8=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 938e8e6..2c8a42f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,7 +77,10 @@ jobs: echo " api:" >> src/main/resources/application.yml echo " key: '${{ secrets.KAKAO_API_KEY }}'" >> src/main/resources/application.yml echo "application.yml 생성 완료" - + + - name: Debug - Print application.yml + run: cat src/main/resources/application.yml + # 2. Build 및 Jacoco 리포트 생성 - name: Build and Test with Jacoco run: ./gradlew clean build test jacocoTestReport From 4095dfdd50806ad44e68b3b4bc3e9721965367f8 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:26:47 +0900 Subject: [PATCH 09/17] Update CI.yml --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2c8a42f..7edb0d5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,6 +15,7 @@ on: jobs: build: + environment: env runs-on: ubuntu-latest permissions: contents: read From a36a77f9d8685e597d0d767964e7a40576466dd2 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:42:15 +0900 Subject: [PATCH 10/17] =?UTF-8?q?feat=20:=20push=20=EB=93=A4=EC=96=B4=20?= =?UTF-8?q?=EC=99=94=EC=9D=84=20=EB=95=8C=EB=A7=8C=20=EC=9E=91=EB=8F=99?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7edb0d5..7cb8408 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,8 +10,6 @@ name: Java CI with Gradle on: push: branches: [ "dev" ] - pull_request: - branches: [ "dev" ] jobs: build: From 60e5b04483fda4de0dc1be2abc5ca1cf3f832460 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:27:51 +0900 Subject: [PATCH 11/17] =?UTF-8?q?chore=20:=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 43 ++-------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7cb8408..c361fc3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,11 +1,4 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle - -name: Java CI with Gradle +name: CI on: push: @@ -76,9 +69,6 @@ jobs: echo " api:" >> src/main/resources/application.yml echo " key: '${{ secrets.KAKAO_API_KEY }}'" >> src/main/resources/application.yml echo "application.yml 생성 완료" - - - name: Debug - Print application.yml - run: cat src/main/resources/application.yml # 2. Build 및 Jacoco 리포트 생성 - name: Build and Test with Jacoco @@ -114,34 +104,5 @@ jobs: run: | docker buildx build --platform linux/amd64 -t $DOCKERHUB_USERNAME/$IMAGE_NAME:$TAG . docker push $DOCKERHUB_USERNAME/$IMAGE_NAME:$TAG + - - # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). - # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. - # - # - name: Setup Gradle - # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 - # with: - # gradle-version: '8.9' - # - # - name: Build with Gradle 8.9 - # run: gradle build - - # dependency-submission: - - # runs-on: ubuntu-latest - # permissions: - # contents: write - - # steps: - # - uses: actions/checkout@v4 - # - name: Set up JDK 17 - # uses: actions/setup-java@v4 - # with: - # java-version: '17' - # distribution: 'temurin' - - # # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. - # # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md - # - name: Generate and submit dependency graph - # uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 From 81667d3c7942e394954f9e2b7e4ecde0f70576e2 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:31:04 +0900 Subject: [PATCH 12/17] =?UTF-8?q?feat=20:=20CD=20PipeLine=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..0fe8436 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,26 @@ +name: CD PipeLine + +on: + workflow_run: + workflows: ["CI Workflow"] # CI 워크플로우의 이름을 기입 + types: + - completed +jobs: + deploy: + # build 잡이 성공한 뒤에만 실행되도록 의존성 설정 + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + + steps: + - name: SSH and Deploy + uses: appleboy/ssh-action@v0.1.10 + with: + host: ${{ secrets.EC2_HOST }} # EC2 호스트 (IP 또는 도메인) + username: ${{ secrets.EC2_USER }} + key: ${{ secrets.EC2_SSH_KEY }} + script: | + # Redis 컨테이너에서 flushall 명령 실행 (비대화형으로 실행) + docker exec redis-app redis-cli flushall + + # 배포 스크립트 실행 + ./deploy.sh From af2dde02d32c6145f40a207592e16b00b1ee4b17 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:31:40 +0900 Subject: [PATCH 13/17] =?UTF-8?q?fix=20:=20workflow=20=EB=AA=85=EC=B9=AD?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 0fe8436..1db94af 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,8 +1,8 @@ -name: CD PipeLine +name: CD on: workflow_run: - workflows: ["CI Workflow"] # CI 워크플로우의 이름을 기입 + workflows: ["CI"] # CI 워크플로우의 이름을 기입 types: - completed jobs: From 74f5e34004dbd873312cae8e39f947af890d835b Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:32:35 +0900 Subject: [PATCH 14/17] =?UTF-8?q?fix=20:=20CD=20=EC=A1=B0=EA=B1=B4=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/CD.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 1db94af..708fb6e 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,10 +1,13 @@ name: CD - + on: + push: + branches: [ "dev" ] workflow_run: workflows: ["CI"] # CI 워크플로우의 이름을 기입 types: - completed + jobs: deploy: # build 잡이 성공한 뒤에만 실행되도록 의존성 설정 From 77b1db55662eb9cd949459d7e87a0992b70f2ad8 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:34:37 +0900 Subject: [PATCH 15/17] =?UTF-8?q?fix=20:=20CD=20=EC=A1=B0=EA=B1=B4=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/CD.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 708fb6e..189c975 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,8 +1,6 @@ name: CD on: - push: - branches: [ "dev" ] workflow_run: workflows: ["CI"] # CI 워크플로우의 이름을 기입 types: From 0e468605b81d65975dd592f0586fe9b313cc36b1 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:39:02 +0900 Subject: [PATCH 16/17] =?UTF-8?q?fix=20:=20ddl-auto=20=EC=98=B5=EC=85=98?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c361fc3..d81afaf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,7 +46,7 @@ jobs: echo " jpa:" >> src/main/resources/application.yml echo " hibernate:" >> src/main/resources/application.yml - echo " ddl-auto: none" >> src/main/resources/application.yml + echo " ddl-auto: update" >> src/main/resources/application.yml echo " show-sql: true" >> src/main/resources/application.yml echo " properties:" >> src/main/resources/application.yml echo " hibernate:" >> src/main/resources/application.yml From 9c921b5d9c7f33fac9ffe53c99b64046420bea93 Mon Sep 17 00:00:00 2001 From: SeoDong <79890834+SD-gif@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:13:55 +0900 Subject: [PATCH 17/17] =?UTF-8?q?fix=20:=20env=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 189c975..084d573 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -8,6 +8,7 @@ on: jobs: deploy: + environment: env # build 잡이 성공한 뒤에만 실행되도록 의존성 설정 if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest