File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ jobs:
148148 AWS_ENVIRONMENT : dev
149149 VERSION_NUMBER : ${{needs.tag_release.outputs.version_tag}}
150150 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
151+ TAG_LATEST : " true"
151152 secrets :
152153 CDK_PUSH_IMAGE_ROLE : ${{ secrets.DEV_CDK_PUSH_IMAGE_ROLE }}
153154
@@ -164,6 +165,7 @@ jobs:
164165 AWS_ENVIRONMENT : qa
165166 VERSION_NUMBER : ${{needs.tag_release.outputs.version_tag}}
166167 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
168+ TAG_LATEST : " true"
167169 secrets :
168170 CDK_PUSH_IMAGE_ROLE : ${{ secrets.QA_CDK_PUSH_IMAGE_ROLE }}
169171
@@ -180,6 +182,7 @@ jobs:
180182 AWS_ENVIRONMENT : ref
181183 VERSION_NUMBER : ${{needs.tag_release.outputs.version_tag}}
182184 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
185+ TAG_LATEST : " true"
183186 secrets :
184187 CDK_PUSH_IMAGE_ROLE : ${{ secrets.REF_CDK_PUSH_IMAGE_ROLE }}
185188
@@ -196,6 +199,7 @@ jobs:
196199 AWS_ENVIRONMENT : int
197200 VERSION_NUMBER : ${{needs.tag_release.outputs.version_tag}}
198201 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
202+ TAG_LATEST : " true"
199203 secrets :
200204 CDK_PUSH_IMAGE_ROLE : ${{ secrets.INT_CDK_PUSH_IMAGE_ROLE }}
201205
@@ -212,5 +216,6 @@ jobs:
212216 AWS_ENVIRONMENT : prod
213217 VERSION_NUMBER : ${{needs.tag_release.outputs.version_tag}}
214218 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
219+ TAG_LATEST : " true"
215220 secrets :
216221 CDK_PUSH_IMAGE_ROLE : ${{ secrets.PROD_CDK_PUSH_IMAGE_ROLE }}
Original file line number Diff line number Diff line change 1212 AWS_ENVIRONMENT :
1313 required : true
1414 type : string
15+ TAG_LATEST :
16+ required : true
17+ type : boolean
1518 secrets :
1619 CDK_PUSH_IMAGE_ROLE :
1720 required : true
6568 docker tag "cdk-utils-build:${{ inputs.VERSION_NUMBER }}" "${{ env.ACCOUNT_ID }}.dkr.ecr.eu-west-2.amazonaws.com/cdk-utils-build-repo:${{ inputs.VERSION_NUMBER }}"
6669 docker push "${{ env.ACCOUNT_ID }}.dkr.ecr.eu-west-2.amazonaws.com/cdk-utils-build-repo:${{ inputs.VERSION_NUMBER }}"
6770
71+ - name : Push cdk-utils-build to Amazon ECR
72+ if : ${{ inputs.TAG_LATEST == 'true' }}
73+ run : |
74+ docker tag "cdk-utils-build:${{ inputs.VERSION_NUMBER }}" "${{ env.ACCOUNT_ID }}.dkr.ecr.eu-west-2.amazonaws.com/cdk-utils-build-repo:latest"
75+ docker push "${{ env.ACCOUNT_ID }}.dkr.ecr.eu-west-2.amazonaws.com/cdk-utils-build-repo:latest"
76+
6877 - name : Check cdk-utils-build scan results
6978 env :
7079 REPOSITORY_NAME : cdk-utils-build-repo
Original file line number Diff line number Diff line change 7979 AWS_ENVIRONMENT : dev
8080 VERSION_NUMBER : PR-${{ needs.get_issue_number.outputs.issue_number }}
8181 COMMIT_ID : ${{ needs.get_commit_id.outputs.commit_id }}
82+ TAG_LATEST : " false"
8283 secrets :
8384 CDK_PUSH_IMAGE_ROLE : ${{ secrets.DEV_CDK_PUSH_IMAGE_ROLE }}
You can’t perform that action at this time.
0 commit comments