From a0c2af70e85b6c5045a9ba3419525c8810201451 Mon Sep 17 00:00:00 2001 From: eu2525 Date: Tue, 26 Nov 2024 18:07:21 +0900 Subject: [PATCH] test deploying ecs task definition --- .github/workflows/deploy_ecs.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy_ecs.yml b/.github/workflows/deploy_ecs.yml index 9163885..27640f5 100644 --- a/.github/workflows/deploy_ecs.yml +++ b/.github/workflows/deploy_ecs.yml @@ -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