This GitHub Action allows run any existing task from ci and wait until it ends. Very useful in case of database migration before new version of app will be deployed.
All pre requirements should be done before usage.
- You need to create task defenition on your AWS console.
- Get AWS's "ci user" keys to pass into "aws-actions/configure-aws-credentials"
Minimum sets of policies should be:
- ecs:RunTask
- ecs:DescribeTasks
- ec2:DescribeSubnets
- ec2:DescribeSecurityGroups
In case you need check cluster exists:
- ecs:DescribeClusters
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Run my ECS task
uses: zamarawka/aws-run-fargate-task@master
with:
task_name: my-ecs-task
cluster: my-ecs-cluster
wait: true
timeout: 600
Name of existing task definition to execute.
- required:
true
The ECS cluster to execute the task on.
- required:
false
- default:
default
Check cluster exists before task run. Need additional IAM policy.
- required:
false
- default:
false
Overide default container command.
- required:
false
Security groups ids
- required:
false
Security groups filter
- required:
false
Security groups names
- required:
false
Subnets filter
- required:
false
Subnets ids
- required:
false
Assign public ip for task
- required:
false
- default:
false
Task ended waiting timeout.
- required:
false
- default:
true
How long to wait when waiting for the ECS task to timeout.
- required:
false
- default:
600
- Create .env file for tests in root folder
- Run:
npm install
npm start
Other commands
npm run format # code fomatting
npm run lint # linting
npm run type-check # type-check
npm run build # build release
Active maintenance with care and ❤️.
Feel free to send a PR.