From 21998b1060ad2df521466c7074eda342dc161e6d Mon Sep 17 00:00:00 2001 From: Haebin Date: Wed, 13 Mar 2024 02:49:12 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20EC2=20Instance=EA=B0=80=20AWS=20Creden?= =?UTF-8?q?tials=EB=A5=BC=20=EA=B0=80=EC=A0=B8=EC=98=A4=EC=A7=80=20?= =?UTF-8?q?=EB=AA=BB=ED=95=98=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index ef54a18..416bc2c 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -66,7 +66,8 @@ jobs: key: ${{ secrets.EC2_PRIVATE_KEY }} port: ${{ secrets.EC2_SSH_PORT }} script: | + aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin ${{ secrets.ECR_URI }} docker pull ${{ secrets.ECR_URI }}:${{ steps.current-time.outputs.formattedTime }} docker ps -f name=vacgom-api -q | xargs --no-run-if-empty docker container stop docker ps -a -f name=vacgom-api -q | xargs --no-run-if-empty docker container rm - docker run -d --name vacgom-api -p 80:8080 ${{ secrets.AWS_ECR_REPO_URI }}:${{ steps.current-time.outputs.formattedTime }} + docker run -d --name vacgom-api -p 80:8080 ${{ secrets.ECR_URI }}:${{ steps.current-time.outputs.formattedTime }}