This executes a given command in the specified ECS Fargate Service. It assumes that all tasks within a service are the same, and it doesn't matter which task the command runs on. We use it to perform database migrations.
Required Region the ECS cluster is in.
Required ECS cluster the target container is a part of.
RequiredECS Service the target container is a part of.
Required Command to run within the targeted service.
uses: ris3sixty/[email protected]
with:
region: 'us-east-1'
cluster_name: 'my-cluster'
service_name: 'my-service'
command: 'npm run migrate'