File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,27 @@ jobs:
108108 if : failure()
109109 with :
110110 webhook_url : ${{ secrets.MSTEAMS_WEBHOOK }}
111- needs : ${{ toJson(needs) }}
112- job : ${{ toJson(job) }}
113- steps : ${{ toJson(steps) }}
111+ # Message to send to Teams as a webhook notification in JSON Payload format
112+ raw : >-
113+ {
114+ "@type": "MessageCard",
115+ "@context": "http://schema.org/extensions",
116+ "summary": "Nightly Tests for Windows failing",
117+ "themeColor": "0078D7",
118+ "title": "PyAnsys Geometry Nightly Tests - Windows failing",
119+ "sections": [
120+ {
121+ "activityTitle": "Windows nightly tests are failing",
122+ "activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
123+ "facts": [
124+ {
125+ "name": "Status",
126+ "value": "Failed"
127+ }
128+ ]
129+ }
130+ ]
131+ }
114132
115133# =================================================================================================
116134# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -151,7 +169,7 @@ jobs:
151169
152170 - name : Microsoft Teams Notification
153171 uses : skitionek/notify-microsoft-teams@master
154- if : always ()
172+ if : failure ()
155173 with :
156174 webhook_url : ${{ secrets.MSTEAMS_WEBHOOK }}
157175 # Message to send to Teams as a webhook notification in JSON Payload format
You can’t perform that action at this time.
0 commit comments