Skip to content

Commit f7e612e

Browse files
[PRM-490] Added further conditionals to the deploy steps to fix inference issue (#79)
1 parent 050502a commit f7e612e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/base-deploy-to-production.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
image_tag:
2424
description: "Does the workflow need an image tag"
2525
type: string
26+
default: ''
2627

2728
jobs:
2829
promote-images-to-prod:
@@ -73,7 +74,7 @@ jobs:
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 ]

0 commit comments

Comments
 (0)