@@ -229,15 +229,27 @@ jobs:
229229  send-results-messages :
230230    runs-on : ubuntu-latest 
231231    steps :
232-       - name : Notify on Discord 
232+       - name : Notify success  on Discord 
233233        if : failure() 
234234        run : | 
235235          curl -H "Content-Type:application/json" \ 
236-           -d '{"embeds": [{"title": "❌  Workflow ${{github.workflow}} #${{github.run_number}} Failed ", "color": 16711680 , "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}]}' \ 
236+           -d '{"content": "Alerting <@1347593178580254761>!", " embeds": [{"title": "✅  Workflow ${{github.workflow}} #${{github.run_number}} finished successfully ", "color": 65280 , "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}]}' \ 
237237          ${{secrets.DISCORD_NOTIFY_WEBHOOK}} 
238- name : Notify on Slack  
238+ name : Notify failure  on Discord  
239239        if : failure() 
240240        run : | 
241241          curl -H "Content-Type:application/json" \ 
242-           -d '{"title": "❌ Workflow ${{github.workflow}} #${{github.run_number}} Failed", "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}' \ 
243-           ${{secrets.SLACK_NOTIFY_WEBHOOK}} 
242+           -d '{"embeds": [{"title": "❌ Workflow ${{github.workflow}} #${{github.run_number}} failed", "color": 16711680, "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}]}' \ 
243+           ${{secrets.DISCORD_NOTIFY_WEBHOOK}} 
244+ name : Notify success on Slack 
245+         if : success() 
246+         run : | 
247+           curl -H "Content-Type:application/json" \ 
248+           -d '{"title": "✅ Workflow ${{github.workflow}} #${{github.run_number}} finished successfully", "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}' \ 
249+           ${{secrets.SLACK_NOTIFY_SUCCESS_WEBHOOK}} 
250+ name : Notify failure on Slack 
251+         if : failure() 
252+         run : | 
253+           curl -H "Content-Type:application/json" \ 
254+           -d '{"title": "❌ Workflow ${{github.workflow}} #${{github.run_number}} failed", "url": "${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"}' \ 
255+           ${{secrets.SLACK_NOTIFY_FAILURE_WEBHOOK}} 
0 commit comments