From 3fee935390d8fb3e7c8452ba20bda1abbff7e54b Mon Sep 17 00:00:00 2001 From: lja3723 Date: Thu, 7 Nov 2024 22:08:06 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20docker=20build=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 0d11e4d7..5093154d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -11,7 +11,7 @@ permissions: jobs: ## 1단계: 프로젝트 빌드 - Build-Project: + Build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -37,31 +37,6 @@ jobs: chmod +x gradlew ./gradlew clean build -x test - - name: Upload Build Artifacts - uses: actions/upload-artifact@v3 - with: - name: build-output - path: build/libs/*.jar - - ## 2단계: 도커 이미지 생성 및 푸시 - Build-Docker-Image-and-Push-to-DockerHub: - runs-on: ubuntu-22.04 - needs: Build-Project - steps: - - uses: actions/checkout@v4 - - - name: Download Build Artifacts - uses: actions/download-artifact@v3 - with: - name: build-output - - - # 다운로드된 .jar 파일을 빌드 컨텍스트로 복사 - - name: Move Build Artifacts to Docker Build Context - run: | - mkdir -p build/libs - mv $GITHUB_WORKSPACE/build-output/*.jar build/libs/ - - name: Docker Hub Login uses: docker/login-action@v3 with: @@ -74,10 +49,10 @@ jobs: - name: Docker Push run: docker push ${{ secrets.DOCKER_REPO_FULLNAME }} - ## 3단계: 서버에 배포 - Deploy-Docker-Image-to-Server-and-Run: + ## 2단계: 서버에 배포 + Deploy: runs-on: ubuntu-22.04 - needs: Build-Docker-Image-and-Push-to-DockerHub + needs: Build steps: - name: Pull New Docker Image uses: appleboy/ssh-action@master