Skip to content

Commit

Permalink
Added code to modify task definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyanka-Inflectionzone committed Feb 2, 2024
1 parent 4be4a45 commit cc8a7ed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/deploy-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:
docker build -t 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }} .
docker push 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }}
- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition reancare-service \
--query taskDefinition > task-definition.json
- name: New image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: reancare-container
image: 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }}

- name: Deploy to ECS
run: |
aws ecs update-service --cluster reancare-cluster --service rean-backend --force-new-deployment
aws ecs update-service --cluster reancare-cluster --service rean-backend --task-definition ${{ steps.task-def.outputs.task_definition_arn }} --force-new-deployment

0 comments on commit cc8a7ed

Please sign in to comment.