Skip to content

Commit 0e5d98d

Browse files
Update deploy.yml and test-automation.yml for improved notification handling and scheduling; remove redundant push branch from deploy.yml
1 parent dd72602 commit 0e5d98d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ on:
99
- main
1010
- dev
1111
- demo
12-
push:
13-
branches:
14-
- deploy-and-test
15-
# - main
16-
# schedule:
17-
# - cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
12+
schedule:
13+
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
1814

1915
env:
2016
GPT_MIN_CAPACITY: 250
@@ -67,7 +63,7 @@ jobs:
6763
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
6864
EMAIL_BODY=$(cat <<EOF
6965
{
70-
"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>"
66+
"body": "<p>Dear Team,</p><p>The quota check has failed, and the pipeline cannot proceed.</p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>Please take necessary action.</p><p>Best regards,<br>Your Automation Team</p>"
7167
}
7268
EOF
7369
)
@@ -127,16 +123,17 @@ jobs:
127123
id: deploy
128124
run: |
129125
set -e
130-
# get right image tag based on branch
126+
# set image tag based on branch
131127
if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then
132128
IMAGE_TAG="latest"
133129
elif [[ "${{ env.BRANCH_NAME }}" == "dev" ]]; then
134130
IMAGE_TAG="dev"
135131
elif [[ "${{ env.BRANCH_NAME }}" == "demo" ]]; then
136132
IMAGE_TAG="demo"
137133
else
138-
IMAGE_TAG="dev"
134+
IMAGE_TAG="latest"
139135
fi
136+
140137
az deployment group create \
141138
--name ${{ env.SOLUTION_PREFIX }}-deployment \
142139
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
@@ -198,6 +195,7 @@ jobs:
198195
uses: ./.github/workflows/test-automation.yml
199196
with:
200197
DOCGEN_URL: ${{ needs.deploy.outputs.WEBAPP_URL }}
198+
secrets: inherit
201199

202200
cleanup-deployment:
203201
if: always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != ''

.github/workflows/test-automation.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
required: true
88
type: string
99
description: "Web URL for DocGen"
10+
secrets:
11+
EMAILNOTIFICATION_LOGICAPP_URL_TA:
12+
required: true
13+
description: "Logic App URL for email notifications"
1014

1115
env:
1216
url: ${{ inputs.DOCGEN_URL }}
@@ -81,7 +85,7 @@ jobs:
8185
name: test-report
8286
path: tests/e2e-test/report/*
8387

84-
- name: Send Notification on Failure
88+
- name: Send Notification
8589
if: always()
8690
run: |
8791
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

infra/main.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,6 @@
909909
"capacity": "[parameters('embeddingDeploymentCapacity')]"
910910
},
911911
"version": "2",
912-
"version": "2",
913912
"raiPolicyName": "Microsoft.Default"
914913
}
915914
],

0 commit comments

Comments
 (0)