|
14 | 14 | - dev |
15 | 15 | - demo |
16 | 16 | schedule: |
17 | | - - cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT |
| 17 | + - cron: "10 11,23 * * *" # Runs at 11:10 AM and 11:10 PM GMT |
18 | 18 |
|
19 | 19 | env: |
20 | 20 | GPT_MIN_CAPACITY: 150 |
|
58 | 58 | RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
59 | 59 | EMAIL_BODY=$(cat <<EOF |
60 | 60 | { |
61 | | - "body": "<p>Dear Team,</p><p>The quota check has failed, and the pipeline cannot proceed.</p><p><strong>Build URL:</strong> ${RUN_URL}</p><p>Please take necessary action.</p><p>Best regards,<br>Your Automation Team</p>" |
| 61 | + "body": "<p>Dear Team,</p><p>The quota check has failed, and the MACAE WAF pipeline cannot proceed.</p><p><strong>Build URL:</strong> ${RUN_URL}</p><p>Please take necessary action.</p><p>Best regards,<br>Your Automation Team</p>" |
62 | 62 | } |
63 | 63 | EOF |
64 | 64 | ) |
|
89 | 89 | azd version |
90 | 90 |
|
91 | 91 | - name: Login to Azure |
| 92 | + id: login-azure |
92 | 93 | run: | |
93 | 94 | az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }} |
94 | 95 | azd auth login --client-id ${{ secrets.AZURE_CLIENT_ID }} --client-secret ${{ secrets.AZURE_CLIENT_SECRET }} --tenant-id ${{ secrets.AZURE_TENANT_ID }} |
@@ -199,6 +200,7 @@ jobs: |
199 | 200 | echo "CONTAINER_APP=${CONTAINER_APP_NAME}" >> $GITHUB_OUTPUT |
200 | 201 | |
201 | 202 | - name: Logout from Azure |
| 203 | + if: always() && steps.login-azure.outcome == 'success' |
202 | 204 | run: | |
203 | 205 | az logout |
204 | 206 | azd auth logout |
@@ -258,14 +260,14 @@ jobs: |
258 | 260 | echo "Deployment deleted successfully." |
259 | 261 |
|
260 | 262 | - name: Send Notification on Failure |
261 | | - if: failure() || needs.deploy.result == 'failure' |
| 263 | + if: always() && (failure() || needs.deploy.result == 'failure') |
262 | 264 | run: | |
263 | 265 | RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
264 | 266 |
|
265 | 267 | # Construct the email body |
266 | 268 | EMAIL_BODY=$(cat <<EOF |
267 | 269 | { |
268 | | - "body": "<p>Dear Team,</p><p>We would like to inform you that the Multi-Agent-Custom-Automation-Engine-Solution-Accelerator Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>" |
| 270 | + "body": "<p>Dear Team,</p><p>We would like to inform you that the Multi-Agent-Custom-Automation-Engine-Solution-Accelerator (WAF) Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>" |
269 | 271 | } |
270 | 272 | EOF |
271 | 273 | ) |
|
0 commit comments