Skip to content

Commit 25f8b7b

Browse files
committed
feat: added webhook for scheduled CI builds
1 parent 0c8e723 commit 25f8b7b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build_ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,38 @@ jobs:
8585
verbose: true
8686
env:
8787
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
88+
- name: Teams webhook
89+
if: failure() && github.event_name == 'schedule'
90+
run: |
91+
curl -X POST ${{ secrets.TEAMS_WEBHOOK }} \
92+
-H 'Content-Type: application/json' \
93+
-d '{
94+
"text": "⚠️ CI build failed",
95+
"sections": [
96+
{
97+
"activityTitle": "Scheduled master/stable build failed",
98+
"activitySubtitle": "Branch: ${{ matrix.target }}",
99+
"facts": [
100+
{
101+
"name": "OS",
102+
"value": "${{ matrix.os }}"
103+
},
104+
{
105+
"name": "Commit",
106+
"value": "${{ github.sha }}"
107+
}
108+
],
109+
"potentialAction": [
110+
{
111+
"name": "Link",
112+
"targets": [
113+
{
114+
"os": "default",
115+
"uri": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
116+
}
117+
]
118+
}
119+
]
120+
}
121+
]
122+
}'

0 commit comments

Comments
 (0)