Skip to content
activity

GitHub Action

Run one-off task on ECS and wait for it to finish

v1.0.2 Latest version

Run one-off task on ECS and wait for it to finish

activity

Run one-off task on ECS and wait for it to finish

Run a task on ECS and waits for ECS task to finish

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run one-off task on ECS and wait for it to finish

uses: tructxn/[email protected]

Learn more about this action in tructxn/aws-ecs-run-task

Choose a version

AWS ECS Run Task

Runs a one-off task on AWS ECS Fargate.

Usage

- name: Run migration
  uses: noelzubin/[email protected]
  with:
    cluster: staging
    task-defintion: run_migration_task_def
    subnets: sb-123123
    security-groups: sg-1231231

- name: Run more Migrations
  uses: noelzubin/[email protected]
  with:
    cluster: staging
    task-defintion: server_backend_task_def
    subnets: sb-123123
    security-groups: sg-1231231
    assign-public-ip: DISABLED
    container-override: server
    container-command: |
        sh
        -c
        cd database && python migrate.py

See aciton.yml file for the full documentation for this action's inputs and outputs.

Note: the task-definition input requires the name of the task-defintion. If you need to use task-definition input files, consider creating other actions to create the task defintion first.

Credentials and Region

This action relies on the default behavior of the AWS SDK for Javascript to determine AWS credentials and region. Use the aws-actions/configure-aws-credentials action to configure the GitHub Actions environment with environment variables containing AWS credentials and your desired region.

License Summary

This code is made available under the MIT license.