|
4 | 4 |
|
5 | 5 | This action uses the new GitHub Actions Commons, that is used by many Bitovi GitHub Actions, and so it's constantly evolving and improving.
|
6 | 6 |
|
| 7 | + ⚠️ BREAKING CHANGES INTRODUCED IN V1 |
| 8 | + Migrating from v0.1.* to v1.0.0 is possible. See [migration path](#migration-path) below. |
| 9 | + |
7 | 10 | 
|
8 | 11 | ## Action Summary
|
9 | 12 | With this action, you can create your ECS (Fargate or EC2) cluster, with tasks and service definitions in a matter of minutes! With an ALB, DNS and even Certificate (if in Route53)
|
|
41 | 44 | deploy-ecs:
|
42 | 45 | runs-on: ubuntu-latest
|
43 | 46 | - name: Create Nginx example
|
44 |
| - uses: bitovi/github-actions-deploy-ecs@v0.1.6 |
| 47 | + uses: bitovi/github-actions-deploy-ecs@v1 |
45 | 48 | id: ecs
|
46 | 49 | with:
|
47 | 50 | aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
80 | 83 | url: ${{ steps.ecs.outputs.ecs_dns_record }}
|
81 | 84 | steps:
|
82 | 85 | - name: Create Nginx example
|
83 |
| - uses: bitovi/github-actions-deploy-ecs@v0.1.6 |
| 86 | + uses: bitovi/github-actions-deploy-ecs@v1 |
84 | 87 | id: ecs
|
85 | 88 | with:
|
86 | 89 | aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
@@ -133,7 +136,11 @@ jobs:
|
133 | 136 | ```
|
134 | 137 |
|
135 | 138 | ## Extra advanced usage
|
136 |
| -If you know what you are doing, you can play around defining a JSON file for the Task definition. That allows you more granular control of it. |
| 139 | +If you know what you are doing, you can play around defining a JSON file for the container definitions. That allows you more granular control of it. |
| 140 | +
|
| 141 | +### Example Task Definition |
| 142 | +
|
| 143 | +You can find an example ECS task definition in [`task-definition.example.json`](./task-definition.example.json). |
137 | 144 |
|
138 | 145 | # Inputs
|
139 | 146 |
|
@@ -187,7 +194,7 @@ The following inputs can be used as `step.with` keys
|
187 | 194 | | `aws_ecs_task_name`| String | Elastic Container Service task name. If task is defined with a JSON file, should be the same as the container name. |
|
188 | 195 | | `aws_ecs_task_ignore_definition` | Boolean | Ignores changes done in the ECS Tasks and services. That way stack can be managed from outside Terraform. Defaults to `false` |
|
189 | 196 | | `aws_ecs_task_execution_role`| String | Elastic Container Service task execution role name from IAM. Defaults to `ecsTaskExecutionRole`. |
|
190 |
| -| `aws_ecs_task_json_definition_file`| String | Name of the json file containing task definition. Overrides every other input. | |
| 197 | +| `aws_ecs_task_json_definition_file`| String | Name of the json file containing container definitions. Overrides every other input. | |
191 | 198 | | `aws_ecs_task_network_mode`| String | Network type to use in task definition. One of `none`, `bridge`, `awsvpc`, and `host`. |
|
192 | 199 | | `aws_ecs_task_cpu`| String | Task CPU Amount. |
|
193 | 200 | | `aws_ecs_task_mem`| String | Task Mem Amount. |
|
@@ -298,6 +305,13 @@ The following inputs can be used as `step.with` keys
|
298 | 305 | ## Contributing
|
299 | 306 | We would love for you to contribute to [`bitovi/github-actions-deploy-ecs`](https://github.com/bitovi/github-actions-deploy-ecs). [Issues](https://github.com/bitovi/github-actions-deploy-ecs/issues) and [Pull Requests](https://github.com/bitovi/github-actions-deploy-ecs/pulls) are welcome!
|
300 | 307 |
|
| 308 | +## **Migration path** |
| 309 | + |
| 310 | +In order to migrate from v0 to v1, the following path should be taken. **Expect downtime** |
| 311 | +1. Set `aws_r53_enable` to `false`, run the action. |
| 312 | +2. Bump to `v1` of the action with `aws_ecs_container_port` and `aws_ecs_lb_port` removed. Run the action. |
| 313 | +3. Add ports back. Run the action. |
| 314 | +4. Set `aws_r53_enable` to `true`, run the action. |
301 | 315 |
|
302 | 316 | ## Note about resource identifiers
|
303 | 317 |
|
|
0 commit comments