Skip to content

Commit

Permalink
test deploying ecs task definition
Browse files Browse the repository at this point in the history
  • Loading branch information
eu2525 committed Nov 26, 2024
1 parent e79965d commit a0c2af7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/deploy_ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ jobs:
task-definition: task-definition.json
container-name: dittodining
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: dittodining
cluster: dittodining
wait-for-service-stability: true

- name: Register Task Definition with ECS
run: |
aws ecs register-task-definition \
--cli-input-json file://task-definition.json
# 아래 명령어를 실행하면 ECS Cluster에 EC2 Instance에 Service로 올라가려고 함. 근데 기존 꺼랑 충돌나서 계속 Pending 인 상태만 유지
# Task Definition을 AWS ECS에 정식으로 등록하려면 반드시 작업을 끝내고 결과를 ECS 서비스에 적용해야 합니다.
# 그런데 주석 처리만 하면 그 결과가 AWS ECS에 반영되지 않습니다.
# - name: Deploy Amazon ECS task definition
# uses: aws-actions/amazon-ecs-deploy-task-definition@v1
# with:
# task-definition: ${{ steps.task-def.outputs.task-definition }}
# service: dittodining
# cluster: dittodining
# wait-for-service-stability: true

0 comments on commit a0c2af7

Please sign in to comment.