From 85177efa4f1b7adcb737072acc699e31db89b4fe Mon Sep 17 00:00:00 2001 From: frombunny Date: Wed, 13 Aug 2025 06:59:01 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:green=5Fheart:=20CI:=20ci=20=ED=9B=84?= =?UTF-8?q?=EC=97=90=20cd=EA=B0=80=20=EC=A7=84=ED=96=89=EB=90=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=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/cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d089d69..396107a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,10 +1,10 @@ name: CD on: - push: - branches: - - main # main 브랜치 push 시 자동 배포 - workflow_dispatch: # 수동 실행 + workflow_run: + workflows: ["CI with Gradle"] # CI 워크플로 이름과 정확히 일치해야 함 + types: [completed] # CI가 끝났을 때 트리거 + branches: [main] # main 에서만 permissions: contents: read From 275eb8393d2e2bc2b6af5f714fe2d02f7e96ea7f Mon Sep 17 00:00:00 2001 From: frombunny Date: Wed, 13 Aug 2025 07:09:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:green=5Fheart:=20CI:=20ci=EC=97=90?= =?UTF-8?q?=EC=84=9C=20job=20=EA=B0=84=EC=9D=98=20=EC=95=84=ED=8B=B0?= =?UTF-8?q?=ED=8C=A9=ED=8A=B8=EB=A5=BC=20=EC=A0=84=EB=8B=AC=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d0d5c0..f05a098 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,12 @@ jobs: - name: Build JAR run: ./gradlew bootJar -x test --no-daemon + - name: Upload JAR artifact + uses: actions/upload-artifact@v4 + with: + name: app-jar + path: build/libs/*.jar + docker-push: name: Docker Build & Push if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' @@ -52,6 +58,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Download JAR artifact + uses: actions/download-artifact@v4 + with: + name: app-jar + path: build/libs + - name: Login to Docker Hub uses: docker/login-action@v3 with: