Skip to content

Commit d673000

Browse files
committed
Document behaviour of capacity-provider-strategy
- Add attribution for improvements
1 parent baa28a1 commit d673000

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
## Amazon ECS "Run Task" Action for GitHub Actions
22

3-
Runs an Amazon ECS task on ECS cluster.
3+
Runs an Amazon ECS task on ECS cluster, with options for Launch Type, VPC Configuration & Capacity Provider Strategy.
4+
5+
Combines improvements from the following repositories and PRs:
6+
7+
- [Add support for capacity provider strategy attribute by @evgeniy-b](https://github.com/smitp/amazon-ecs-run-task/pull/76/files) -
8+
to add support for [capacity provider strategy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html?icmpid=docs_ecs_hp_deploy).
9+
- [YashdalfTheGray/amazon-ecs-run-task](https://github.com/YashdalfTheGray/amazon-ecs-run-task/) - to add support
10+
for `launchType` and `networkConfiguration`
11+
- [smitp/amazon-ecs-run-task](https://github.com/smitp/amazon-ecs-run-task) - initial fork which enabled running of an
12+
ECS task
413

514
**Table of Contents**
615

@@ -21,7 +30,7 @@ Runs an Amazon ECS task on ECS cluster.
2130

2231
```yaml
2332
- name: Run Task on Amazon ECS
24-
uses: muya/amazon-ecs-run-task
33+
uses: muya/amazon-ecs-run-task@v1
2534
with:
2635
task-definition: task-definition.json
2736
cluster: my-cluster
@@ -95,7 +104,7 @@ The task definition file can be updated prior to deployment with the new contain
95104
image: ${{ steps.build-image.outputs.image }}
96105
97106
- name: Run Task on Amazon ECS
98-
uses: muya/amazon-ecs-run-task
107+
uses: muya/amazon-ecs-run-task@v1
99108
with:
100109
task-definition: task-definition.json
101110
cluster: my-cluster

action.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,29 @@ inputs:
2323
description: 'How long to wait for the task reach stopped state, in minutes (default: 30 minutes, max: 6 hours).'
2424
required: false
2525
launch-type:
26-
description: The launch type of the task, either FARGATE or EC2
26+
description: The launch type of the task, either FARGATE or EC2. Can be overridden by the capacity-provider-strategy.
2727
required: false
2828
capacity-provider-strategy:
29-
description: 'JSON representation of the capacity provider strategy to use for the task. Only set if provided. Example: [{"capacityProvider": "FARGATE_SPOT", "base": 0, "weight": 1}]. Provider options: [FARGATE, FARGATE_SPOT]'
29+
description: |
30+
JSON representation of the capacity provider strategy to use for the task. Only set if provided.
31+
Example: '[{"capacityProvider": "FARGATE_SPOT", "base": 0, "weight": 1}]'.
32+
Provider options: [FARGATE, FARGATE_SPOT].
33+
Overrides value of launch-type if set.
3034
required: false
3135
subnets:
32-
description: The subnets to launch a FARGATE tasks in, required if launch type is FARGATE and is expected in CSV format
36+
description: |
37+
The subnets to launch a FARGATE tasks in, required if launch type is FARGATE and is expected in CSV format.
38+
Only applies if either "launch-type" or "capacity-provider-strategy" is set.
3339
required: false
3440
security-groups:
35-
description: The security groups to associate a FARGATE task with, required if launch type is FARGATE and is expected in CSV format
41+
description: |
42+
The security groups to associate a FARGATE task with, required if launch type is FARGATE and is expected in CSV format.
43+
Only applies if either "launch-type" or "capacity-provider-strategy" is set.
3644
required: false
3745
assign-public-ip:
38-
description: Whether to assign a public IP to the FARGATE task or not, required if launch type is FARGATE. Should be one of [DISABLED,ENABLED]
46+
description: |
47+
Whether to assign a public IP to the FARGATE task or not, required if launch type is FARGATE.
48+
Should be one of [DISABLED,ENABLED]. Defaults to DISABLED
3949
required: false
4050
task-role-override:
4151
description: A role ARN for task permissions so that a role ARN is not hardcoded within the task definition

0 commit comments

Comments
 (0)