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
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
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,35 @@ inputs:
32
32
description: "The name of the AWS CodeDeploy deployment group, if the ECS service uses the CODE_DEPLOY deployment controller. Will default to 'DgpECS-{cluster}-{service}'."
33
33
required: false
34
34
codedeploy-deployment-description:
35
-
description: "A description of the deployment, if the ECS service uses the CODE_DEPLOY deployment controller."
35
+
description: "A description of the deployment, if the ECS service uses the CODE_DEPLOY deployment controller. NOTE: This will be truncated to 512 characters if necessary."
36
36
required: false
37
37
codedeploy-deployment-config:
38
38
description: "The name of the AWS CodeDeploy deployment configuration, if the ECS service uses the CODE_DEPLOY deployment controller. If not specified, the value configured in the deployment group or `CodeDeployDefault.OneAtATime` is used as the default."
39
39
required: false
40
40
force-new-deployment:
41
41
description: 'Whether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.'
42
42
required: false
43
+
run-task:
44
+
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.'
45
+
required: false
46
+
run-task-container-overrides:
47
+
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'
48
+
required: false
49
+
run-task-security-groups:
50
+
description: 'A comma-separated list of security group IDs to assign to a task when run outside of a service. Will default to none.'
51
+
required: false
52
+
run-task-subnets:
53
+
description: 'A comma-separated list of subnet IDs to assign to a task when run outside of a service. Will default to none.'
54
+
required: false
55
+
run-task-launch-type:
56
+
description: "ECS launch type for tasks run outside of a service. Valid values are 'FARGATE' or 'EC2'. Will default to 'FARGATE'."
57
+
required: false
58
+
run-task-started-by:
59
+
description: "A name to use for the startedBy tag when running a task outside of a service. Will default to 'GitHub-Actions'."
60
+
required: false
61
+
wait-for-task-stopped:
62
+
description: 'Whether to wait for the task to stop when running it outside of a service. Will default to not wait.'
63
+
required: false
43
64
outputs:
44
65
task-definition-arn:
45
66
description: 'The ARN of the registered ECS task definition'
0 commit comments