File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 image_tag :
2424 description : " Does the workflow need an image tag"
2525 type : string
26+ default : ' '
2627
2728jobs :
2829 promote-images-to-prod :
7374 secrets : inherit
7475
7576 deploy-infra-no-images :
76- if : ${{ inputs.image_tag == '' && inputs.is_deployment }}
77+ if : ${{ always() && inputs.image_tag == '' && inputs.is_deployment && needs.plan-infra.result == 'success' }}
7778 environment : ${{ inputs.environment }}-deploy
7879 name : Deploy Infrastructure (no images)
7980 needs : [ plan-infra ]
@@ -158,7 +159,7 @@ jobs:
158159 run : terraform apply -auto-approve -input=false ${{ vars.AWS_ENVIRONMENT }}.tfplan
159160
160161 deploy-infra-with-images :
161- if : ${{ inputs.image_tag && inputs.is_deployment }}
162+ if : ${{ always() && inputs.image_tag && inputs.is_deployment && needs.plan-infra.result == 'success' }}
162163 environment : ${{ inputs.environment }}-deploy
163164 name : Deploy Infrastructure (with new image)
164165 needs : [ promote-images-to-prod, plan-infra ]
You can’t perform that action at this time.
0 commit comments