Note: This action is designed for use within Perx Health's infrastructure... it might not be very useful for other scenarios!
This repository contains a GitHub Action allowing you to run ECS tasks by providing a task definition.
As an example, add the following step
to a GitHub Actions workflow.
- name: 🚀 Migrate Database
uses: perxhealth/aws-ecs-task-action@v1
with:
perx_env: qa
perx_region: au
perx_app_name: behavioural-science-hacks
definition: /path/to/definition.tpl.json
The Action currently expects five required inputs, and no further optional inputs.
NOTE: Input names are underscores, not hyphenated.
-
perx_env
Name of the Perx Environment which the deploy will target.
-
perx_region
Name of the Perx Region, representing locations on Earth and data sovereignty boundaries where the deploy will live.
-
perx_app_name
Name of the application/service itself. This is expected to match the application/service's cluster/runner naming convention.
-
definition
Location on disk from where the task definition file can be read. This is the task definition which is then registered with ECS.
-
launch_type
Define whether your task should launch in to EC2, FARGATE or EXTERNAL
-
task-definition-arn
ARN of the resultant task definition on ECS
-
task-arns
Array of ARNs which identify the resultant tasks
-
tasks-started-count
Provides the total number of how many ECS Tasks were started, regardless of their status or success
-
tasks-started-failed-count
Provides the total number of ECS tasks which failed to start
The Action currently expects AWS credentials to exist in the environment, with sufficient permissions to perform the following actions.
DescribeTasks
RegisterTaskDefinition
RunTask
The Action is written in Node with the main entrypoint being src/index.ts
.
$ git clone git@github.com:perxhealth/aws-ecs-task-action.git
$ cd aws-ecs-task-action
At the time of writing, there's no test suite to run.