Run ad-hoc ECS tasks
masterYou can use this action to trigger an ad-hoc ECS task run, which is useful for initialization tasks like database migrations. When run-task: true is used, the service update will not proceed until the ad-hoc task exits successfully if wait-for-task-stopped: true is also set.
Note: For FARGATE launch types, your task definition must use the awsvpc network mode and you must specify a network configuration (refer to action.yml for details).
- name: Deploy to Amazon ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: task-definition.json
service: my-service
cluster: my-cluster
wait-for-service-stability: true
run-task: true
wait-for-task-stopped: true