You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,26 @@ The minimal permissions require access to CodeDeploy:
222
222
}
223
223
```
224
224
225
+
## Running Tasks
226
+
227
+
For services which need an initialization task, such as database migrations, or ECS tasks that are run without a service, additional configuration can be added to trigger an ad-hoc task run. When combined with GitHub Action's `on: schedule` triggers, runs can also be scheduled without EventBridge.
228
+
229
+
In the following example, the service would not be updated until the ad-hoc task exits successfully.
Overrides and VPC networking options are available as well. See [actions.yml](actions.yml) for more details.
244
+
225
245
## Troubleshooting
226
246
227
247
This action emits debug logs to help troubleshoot deployment failures. To see the debug logs, create a secret named `ACTIONS_STEP_DEBUG` with value `true` in your repository.
Copy file name to clipboardExpand all lines: action.yml
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,27 @@ inputs:
34
34
force-new-deployment:
35
35
description: 'Whether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.'
36
36
required: false
37
+
run-task:
38
+
description: 'Whether to run the task outside of an ECS service. Task will run before the service is updated if both are provided. Will default to not run.'
39
+
required: false
40
+
run-task-container-overrides:
41
+
description: 'A JSON array of container override objects which should applied when running a task outside of a service. Warning: Do not expose this field to untrusted inputs. More details: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.html'
42
+
required: false
43
+
run-task-security-groups:
44
+
description: 'A comma-separated list of security group IDs to assign to a task when run outside of a service. Will default to none.'
45
+
required: false
46
+
run-task-subnets:
47
+
description: 'A comma-separated list of subnet IDs to assign to a task when run outside of a service. Will default to none.'
48
+
required: false
49
+
run-task-launch-type:
50
+
description: "ECS launch type for tasks run outside of a service. Valid values are 'FARGATE' or 'EC2'. Will default to 'FARGATE'."
51
+
required: false
52
+
run-task-started-by:
53
+
description: "A name to use for the startedBy tag when running a task outside of a service. Will default to 'GitHub-Actions'."
54
+
required: false
55
+
wait-for-task-stopped:
56
+
description: 'Whether to wait for the task to stop when running it outside of a service. Will default to not wait.'
57
+
required: false
37
58
outputs:
38
59
task-definition-arn:
39
60
description: 'The ARN of the registered ECS task definition'
0 commit comments