diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 7cdc2d87f..0efb864b9 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -76,5 +76,5 @@ jobs: script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} - docker stop server-spring - docker run -d --name server-spring -p 8080:8080 -d server-spring:${{ needs.build.outputs.sha }} + docker stop ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring && docker rm ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring + docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} diff --git a/.github/workflows/develop_deploy.yml b/.github/workflows/develop_deploy.yml index 3a8e154ca..e7cd70bf3 100644 --- a/.github/workflows/develop_deploy.yml +++ b/.github/workflows/develop_deploy.yml @@ -25,5 +25,5 @@ jobs: script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ github.event.inputs.commit_hash }} - docker stop server-spring - docker run -d --name server-spring -p 8080:8080 -d server-spring:${{ github.event.inputs.commit_hash }} + docker stop ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring && docker rm ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring + docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ github.event.inputs.commit_hash }}