-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
44 lines (40 loc) · 1.37 KB
/
action.yml
File metadata and controls
44 lines (40 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 'ECS Deploy'
description: 'Deploys single container to ecs with environment variables'
inputs:
image:
description: 'Container image'
required: true
environment:
description: 'Deploy environment name'
required: true
service:
description: 'Service name'
required: true
cluster:
description: 'ECS cluster'
required: true
variables:
description: 'List of environment variables'
required: false
runs:
using: "composite"
steps:
- name: Get current task definition
shell: bash
run: |
aws ecs describe-task-definition --task-definition ${{ inputs.environment }}-${{ inputs.service }} --query taskDefinition > task-definition.json
- name: Update task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: ${{ inputs.service }}
image: ${{ inputs.image }}
environment-variables: ${{ inputs.variables }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ inputs.environment }}-${{ inputs.service }}-service
cluster: ${{ inputs.cluster }}
wait-for-service-stability: true