2424 name : Build deploy image and push to registry
2525 runs-on : ubuntu-latest
2626 environment : ${{ inputs.environment }}
27- timeout-minutes : ${{ vars.timeout_minutes }}
27+ timeout-minutes : ${{ vars.timeout_minutes || 30 }}
2828 steps :
2929 - name : Check out code
3030 uses : actions/checkout@v4
@@ -65,23 +65,23 @@ jobs:
6565 - name : Build and push
6666 uses : docker/build-push-action@v6
6767 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 || '' }}
7373 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 }}
7676 cache-from : type=gha
7777 cache-to : type=gha,mode=max
78- secret-files : ${{ vars.secret_files }}
78+ secret-files : ${{ vars.secret_files || '' }}
7979
8080 deploy-to-ecs :
8181 name : ' Deploy to ECS'
8282 runs-on : ubuntu-latest
8383 environment : ${{ inputs.environment }}
84- timeout-minutes : ${{ vars.timeout_minutes }}
84+ timeout-minutes : ${{ vars.timeout_minutes || 30 }}
8585 steps :
8686 - name : Check out code
8787 uses : actions/checkout@v4
@@ -97,14 +97,14 @@ jobs:
9797 id : gen-task-def
9898 uses :
aws-actions/[email protected] 9999 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 }}
103103
104104 - name : Deploy Amazon ECS task definition
105105 uses : aws-actions/amazon-ecs-deploy-task-definition@v2
106106 with :
107107 task-definition : ${{ steps.gen-task-def.outputs.task-definition }}
108- service : ${{ vars.ecs_service }}
108+ service : ' js-react-example '
109109 cluster : ${{ vars.ecs_cluster }}
110110 wait-for-service-stability : true
0 commit comments