From 1857d042c76275e7ef0ec739a707bf5418dd42ee Mon Sep 17 00:00:00 2001 From: Kijun Kwon Date: Fri, 16 Aug 2024 14:22:24 +0900 Subject: [PATCH] =?UTF-8?q?[SAMBAD-250]=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20/?= =?UTF-8?q?=20=ED=83=9C=EA=B7=B8=20=EB=AA=85=EC=9C=BC=EB=A1=9C=20=EB=B2=84?= =?UTF-8?q?=EC=A0=80=EB=8B=9D=EB=90=98=EC=96=B4=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=EB=90=98=EB=8F=84=EB=A1=9D=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-deploy.yml | 7 ++++--- .github/workflows/prod-deploy.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 54f14569..6a04ae83 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -28,8 +28,8 @@ jobs: - name: "도커 빌드 및 푸시" run: | docker login ${{ secrets.DOCKER_REPO }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:develop . - docker push ${{ secrets.DOCKER_REPO }}/moring-api:develop + docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . + docker push ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} deploy: needs: build @@ -44,5 +44,6 @@ jobs: password: ${{ secrets.NCP_PASSWORD }} port: ${{ secrets.NCP_PORT }} script: | + sed -i 's|moring-api:[^ ]*|moring-api:${{ github.ref_name }}|' docker-compose.yml sudo docker compose -f /root/docker-compose.yml pull - sudo docker compose -f /root/docker-compose.yml up -d + sudo docker compose -f /root/docker-compose.yml up api -d diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index fb05a6b8..69365dab 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -28,8 +28,8 @@ jobs: - name: "도커 빌드 및 푸시" run: | docker login ${{ secrets.DOCKER_REPO }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:develop . - docker push ${{ secrets.DOCKER_REPO }}/moring-api:develop + docker build -t ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} . + docker push ${{ secrets.DOCKER_REPO }}/moring-api:${{ github.ref_name }} deploy: needs: build @@ -44,5 +44,6 @@ jobs: password: ${{ secrets.NCP_PASSWORD }} port: ${{ secrets.NCP_PORT }} script: | + sed -i 's|moring-api:[^ ]*|moring-api:${{ github.ref_name }}|' docker-compose.yml sudo docker compose -f /root/docker-compose.yml pull - sudo docker compose -f /root/docker-compose.yml up -d + sudo docker compose -f /root/docker-compose.yml up api -d