@@ -179,14 +179,6 @@ jobs:
179
179
shell : cmd
180
180
run : ' "%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
181
181
182
- - uses : sarisia/actions-status-discord@v1
183
- if : failure()
184
- with :
185
- webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
186
- username : GitHub Actions
187
- color : 0xFF0000
188
- title : ${{ github.job }}
189
-
190
182
Linux :
191
183
runs-on : ubuntu-20.04
192
184
steps :
@@ -318,15 +310,6 @@ jobs:
318
310
- name : Build example_sdl_opengl3
319
311
run : make -C examples/example_sdl_opengl3
320
312
321
- # Use https://github.com/marketplace/actions/actions-status-discord to send status to Discord
322
- - uses : sarisia/actions-status-discord@v1
323
- if : failure()
324
- with :
325
- webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
326
- username : GitHub Actions
327
- color : 0xFF0000
328
- title : ${{ github.job }}
329
-
330
313
MacOS :
331
314
runs-on : macOS-latest
332
315
steps :
@@ -382,15 +365,6 @@ jobs:
382
365
- name : Build example_apple_opengl2
383
366
run : xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2
384
367
385
- # Use https://github.com/marketplace/actions/actions-status-discord to send status to Discord
386
- - uses : sarisia/actions-status-discord@v1
387
- if : failure()
388
- with :
389
- webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
390
- username : GitHub Actions
391
- color : 0xFF0000
392
- title : ${{ github.job }}
393
-
394
368
iOS :
395
369
runs-on : macOS-latest
396
370
steps :
@@ -403,15 +377,6 @@ jobs:
403
377
# Code signing is required, but we disable it because it is irrelevant for CI builds.
404
378
xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
405
379
406
- # Use https://github.com/marketplace/actions/actions-status-discord to send status to Discord
407
- - uses : sarisia/actions-status-discord@v1
408
- if : failure()
409
- with :
410
- webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
411
- username : GitHub Actions
412
- color : 0xFF0000
413
- title : ${{ github.job }}
414
-
415
380
Emscripten :
416
381
runs-on : ubuntu-18.04
417
382
steps :
@@ -434,11 +399,33 @@ jobs:
434
399
popd
435
400
make -C examples/example_emscripten
436
401
437
- # Use https://github.com/marketplace/actions/actions-status-discord to send status to Discord
438
- - uses : sarisia/actions-status-discord@v1
439
- if : failure()
402
+ Discord-CI :
403
+ runs-on : ubuntu-18.04
404
+ if : always()
405
+ needs : [Windows, Linux, MacOS, iOS, Emscripten]
406
+ steps :
407
+ - uses : dearimgui/github_discord_notifier@latest
440
408
with :
441
- webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
442
- username : GitHub Actions
443
- color : 0xFF0000
444
- title : ${{ github.job }}
409
+ discord-webhook : ${{ secrets.DISCORD_CI_WEBHOOK }}
410
+ github-token : ${{ github.token }}
411
+ action-task : discord-jobs
412
+ discord-filter : " '{{ github.branch }}'.match(/master|docking|tables/g) != null && '{{ run.conclusion }}' != '{{ last_run.conclusion }}'"
413
+ discord-username : GitHub Actions
414
+ discord-job-new-failure-message : ' '
415
+ discord-job-fixed-failure-message : ' '
416
+ discord-job-new-failure-embed : |
417
+ {
418
+ "title": "`{{ job.name }}` job is failing on `{{ github.branch }}`!",
419
+ "description": "Commit [{{ github.context.payload.head_commit.title }}]({{ github.context.payload.head_commit.url }}) pushed to [{{ github.branch }}]({{ github.branch_url }}) broke [{{ job.name }}]({{ job.url }}) build job.\nFailing steps: {{ failing_steps }}",
420
+ "url": "{{ job.url }}",
421
+ "color": "0xFF0000",
422
+ "timestamp": "{{ run.updated_at }}"
423
+ }
424
+ discord-job-fixed-failure-embed : |
425
+ {
426
+ "title": "`{{ github.branch }}` branch is no longer failing!",
427
+ "description": "Build failures were fixed on [{{ github.branch }}]({{ github.branch_url }}) branch.",
428
+ "color": "0x00FF00",
429
+ "url": "{{ github.context.payload.head_commit.url }}",
430
+ "timestamp": "{{ run.completed_at }}"
431
+ }
0 commit comments