Skip to content

Commit 6bb5d69

Browse files
committed
Added requirement for staging to pass before prod can be deployed
1 parent 0c44951 commit 6bb5d69

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ jobs:
154154
155155
156156
deploy-staging:
157-
if: ${{inputs.environment == 'staging'}}
157+
# Always run staging deployment first when production is requested
158+
if: ${{inputs.environment == 'staging' || inputs.environment == 'production'}}
158159
uses: ./.github/workflows/staging_deploy.yml
159160
needs: setup
160161
with:
@@ -175,9 +176,10 @@ jobs:
175176
gcp_credentials: ${{ secrets.gcp_credentials }}
176177

177178
deploy-production:
178-
if: ${{inputs.environment == 'production'}}
179+
# Only run production if staging succeeded
180+
if: ${{inputs.environment == 'production' && needs.deploy-staging.result == 'success'}}
179181
uses: ./.github/workflows/production_deploy.yml
180-
needs: setup
182+
needs: [setup, deploy-staging]
181183
with:
182184
evaluation_function_name: ${{ needs.setup.outputs.evaluation_function_name }}
183185
template-repository-name: ${{ inputs.template-repository-name }}

0 commit comments

Comments
 (0)