Skip to main content

GitHub Action: run-ecspresso

Run ECS task with Escpresso

Introduction

This is template repository to create composite GitHub Actions. Feel free to use it as reference and starting point.

Usage

  name: Pull Request
on:
push:
branches: [ 'main' ]

jobs:
context:
runs-on: ubuntu-latest
steps:
- name: Example action
uses: cloudposse/example-github-action-run-ecspresso@main
id: example
with:
image: 1111111111111.dkr.ecr.us-east-2.amazonaws.com/cloudposse/example-app-on-ecs
image-tag: latest
region: us-east-2
operation: deploy
cluster: acme-plat-ue2-sandbox
application: acme-plat-ue2-sandbox-example-app-on-ecs
taskdef-path: taskdef.json
overrides: |-
{
"containerOverrides":[
{
"name": "app",
"command": ["/db-migrate.sh"]
}
]
}

outputs:
result: ${{ steps.example.outputs.webapp-url }}

Inputs

NameDescriptionDefaultRequired
applicationApplication nameN/Atrue
clusterCluster nameN/Atrue
debugDebug modefalsefalse
ecspresso-versionEcspresso versionv2.1.0false
imageDocker imageN/Atrue
image-tagDocker image tagN/Atrue
mirror_to_s3_bucketMirror task definition to s3 bucketN/Afalse
overridesA list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive.{}false
regionAWS RegionN/Atrue
taskdef-pathTask definition pathN/Atrue
timeoutEcspresso timeout5mfalse
use_partial_taskdefinitionNOTE: Experimental. Load templated task definition from S3 bucket, which is created by the ecs-service component. This is useful when you want to manage the task definition in the infrastructure repository and the application repository. The infrastructure repository manages things like Volumes and EFS mounts, and the Application repository manages the application code and environment variables.N/Afalse

Outputs

NameDescription
webapp-urlWeb Application url