Skip to content

Commit c9a0501

Browse files
authored
Merge pull request #11 from BusanHackathon/feature/#2-login
fix: deploy파일 ecr 로그인 로직 추가
2 parents 5cc8487 + 3c634dc commit c9a0501

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ jobs:
6363
ssh -o StrictHostKeyChecking=no \
6464
-i ~/.ssh/busan-a-spring-server.pem \
6565
ubuntu@${{ secrets.PRIVATE_EC2_INTERNAL_IP }} << 'EOF'
66+
67+
aws ecr get-login-password --region ap-northeast-2 \
68+
| docker login --username AWS --password-stdin ${{ steps.login-ecr.outputs.registry }}
69+
6670
docker stop busan || true
6771
docker rm busan || true
6872
docker pull ${{ steps.login-ecr.outputs.registry }}/busan:latest
69-
docker run -d --name busan --restart=unless-stopped \
73+
docker run -d --name busan --restart=unless-stopped \
7074
-e SPRING_PROFILES_ACTIVE=dev \
7175
-p 8080:8080 \
7276
${{ steps.login-ecr.outputs.registry }}/busan:latest

0 commit comments

Comments
 (0)