24
24
name : Build deploy image and push to registry
25
25
runs-on : ubuntu-latest
26
26
environment : ${{ inputs.environment }}
27
- timeout-minutes : ${{ vars.timeout_minutes }}
27
+ timeout-minutes : ${{ vars.timeout_minutes || 30 }}
28
28
steps :
29
29
- name : Check out code
30
30
uses : actions/checkout@v4
@@ -65,23 +65,23 @@ jobs:
65
65
- name : Build and push
66
66
uses : docker/build-push-action@v6
67
67
with :
68
- context : ${{ vars.context }}
69
- platforms : ${{ vars.platforms }}
70
- provenance : ${{ vars.provenance }}
71
- file : ${{ vars.file }}
72
- target : ${{ vars.target }}
68
+ context : ${{ vars.context || '.' }}
69
+ platforms : ${{ vars.platforms || 'linux/amd64' }}
70
+ provenance : ${{ vars.provenance || false }}
71
+ file : ${{ vars.file || '' }}
72
+ target : ${{ vars.target || '' }}
73
73
push : true
74
- build-args : ${{ vars.build_args }}
75
- tags : ${{ vars.aws_ecr_uri }}:${{ vars .tags }}
74
+ build-args : ${{ vars.build_args || '' }}
75
+ tags : ${{ vars.aws_ecr_uri }}:${{ inputs .tags }}
76
76
cache-from : type=gha
77
77
cache-to : type=gha,mode=max
78
- secret-files : ${{ vars.secret_files }}
78
+ secret-files : ${{ vars.secret_files || '' }}
79
79
80
80
deploy-to-ecs :
81
81
name : ' Deploy to ECS'
82
82
runs-on : ubuntu-latest
83
83
environment : ${{ inputs.environment }}
84
- timeout-minutes : ${{ vars.timeout_minutes }}
84
+ timeout-minutes : ${{ vars.timeout_minutes || 30 }}
85
85
steps :
86
86
- name : Check out code
87
87
uses : actions/checkout@v4
@@ -97,14 +97,14 @@ jobs:
97
97
id : gen-task-def
98
98
uses :
aws-actions/[email protected]
99
99
with :
100
- task-definition : ${{ vars.task_def_path }}
101
- container-name : ${{ vars.container_name }}
102
- image : ${{ vars.aws_ecr_uri }}:${{ vars .tags }}
100
+ task-definition : ' .aws/ecs/task-definition-app-staging.json '
101
+ container-name : ' js-react-example '
102
+ image : ${{ vars.aws_ecr_uri }}:${{ inputs .tags }}
103
103
104
104
- name : Deploy Amazon ECS task definition
105
105
uses : aws-actions/amazon-ecs-deploy-task-definition@v2
106
106
with :
107
107
task-definition : ${{ steps.gen-task-def.outputs.task-definition }}
108
- service : ${{ vars.ecs_service }}
108
+ service : ' js-react-example '
109
109
cluster : ${{ vars.ecs_cluster }}
110
110
wait-for-service-stability : true
0 commit comments