From e402cc5197e11da804bafe4b03f9a4f63da84f9a Mon Sep 17 00:00:00 2001 From: swa07016 Date: Thu, 1 Aug 2024 21:38:53 +0900 Subject: [PATCH] ci: build to bootJar --- .github/workflows/dev-deploy.yml | 4 ++-- .github/workflows/prod-deploy.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 08dc791..17e7078 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -41,7 +41,7 @@ jobs: run: chmod +x ./gradlew - name: Gradle로 빌드 - run: ./gradlew build -x test -Pprofile=dev + run: ./gradlew bootJar -x test -Pprofile=dev - name: 빌드 아티팩트 업로드 uses: actions/upload-artifact@v3 @@ -102,4 +102,4 @@ jobs: docker rm dailyphrase-dev-api || true # 새로운 Docker 컨테이너 실행 - docker run -d --name dailyphrase-dev-api -p 80:8080 ${{ secrets.DEV_AWS_ECR_REPOSITORY_URL }}:${{ github.sha }} + docker run -d --name dailyphrase-dev-api -e SPRING_PROFILES_ACTIVE=dev -p 80:8080 ${{ secrets.DEV_AWS_ECR_REPOSITORY_URL }}:${{ github.sha }} diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index ff28a5b..abe698c 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -41,7 +41,7 @@ jobs: run: chmod +x ./gradlew - name: Build with Gradle - run: ./gradlew build -x test -Pprofile=prod + run: ./gradlew bootJar -x test -Pprofile=prod - name: Upload build artifacts uses: actions/upload-artifact@v3 @@ -102,4 +102,4 @@ jobs: docker rm dailyphrase-prod-api || true # 새로운 Docker 컨테이너 실행 - docker run -d --name dailyphrase-prod-api -p 80:8080 ${{ secrets.AWS_ECR_REPOSITORY_URL }}:${{ github.sha }} + docker run -d --name dailyphrase-prod-api -e SPRING_PROFILES_ACTIVE=prod -p 80:8080 ${{ secrets.AWS_ECR_REPOSITORY_URL }}:${{ github.sha }}