6161 description : ' Trigger type (workflow_dispatch, pull_request, schedule)'
6262 required : true
6363 type : string
64+ image_model_choice :
65+ description : ' Image model to deploy (gpt-image-1-mini, gpt-image-1.5, none)'
66+ required : false
67+ default : ' gpt-image-1-mini'
68+ type : string
6469
6570env :
6671 AZURE_DEV_COLLECT_TELEMETRY : ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
67- permissions :
68- contents : read
69- actions : read
70-
72+
7173jobs :
7274 docker-build :
7375 uses : ./.github/workflows/job-docker-build.yml
9496 docker_image_tag : ${{ needs.docker-build.outputs.IMAGE_TAG }}
9597 run_e2e_tests : ${{ inputs.run_e2e_tests }}
9698 cleanup_resources : ${{ inputs.cleanup_resources }}
99+ image_model_choice : ${{ inputs.image_model_choice }}
97100 secrets : inherit
98101
99102 e2e-test :
@@ -105,9 +108,25 @@ jobs:
105108 TEST_SUITE : ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
106109 secrets : inherit
107110
111+ cleanup-deployment :
112+ if : " !cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
113+ needs : [docker-build, deploy, e2e-test]
114+ uses : ./.github/workflows/job-cleanup-deployment.yml
115+ with :
116+ runner_os : ${{ inputs.runner_os }}
117+ trigger_type : ${{ inputs.trigger_type }}
118+ cleanup_resources : ${{ inputs.cleanup_resources }}
119+ existing_webapp_url : ${{ inputs.existing_webapp_url }}
120+ RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
121+ AZURE_LOCATION : ${{ needs.deploy.outputs.AZURE_LOCATION }}
122+ AZURE_ENV_OPENAI_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
123+ ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
124+ IMAGE_TAG : ${{ needs.deploy.outputs.IMAGE_TAG }}
125+ secrets : inherit
126+
108127 send-notification :
109128 if : " !cancelled()"
110- needs : [docker-build, deploy, e2e-test]
129+ needs : [docker-build, deploy, e2e-test, cleanup-deployment ]
111130 uses : ./.github/workflows/job-send-notification.yml
112131 with :
113132 trigger_type : ${{ inputs.trigger_type }}
@@ -122,20 +141,5 @@ jobs:
122141 QUOTA_FAILED : ${{ needs.deploy.outputs.QUOTA_FAILED }}
123142 TEST_SUCCESS : ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
124143 TEST_REPORT_URL : ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
125- secrets : inherit
126-
127- cleanup-deployment :
128- if : " !cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
129- needs : [docker-build, deploy, e2e-test]
130- uses : ./.github/workflows/job-cleanup-deployment.yml
131- with :
132- runner_os : ${{ inputs.runner_os }}
133- trigger_type : ${{ inputs.trigger_type }}
134- cleanup_resources : ${{ inputs.cleanup_resources }}
135- existing_webapp_url : ${{ inputs.existing_webapp_url }}
136- RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
137- AZURE_LOCATION : ${{ needs.deploy.outputs.AZURE_LOCATION }}
138- AZURE_ENV_OPENAI_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
139- ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
140- IMAGE_TAG : ${{ needs.deploy.outputs.IMAGE_TAG }}
144+ cleanup_result : ${{ needs.cleanup-deployment.result }}
141145 secrets : inherit
0 commit comments