@@ -55,18 +55,20 @@ jobs:
5555 git commit -m "Automated Publishing of Documentation for Apicurio Studio"
5656 git push
5757
58- - name : Google Chat Notification
59- if : ${{ failure() }}
60- uses : Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
61- with :
62- name : ${{ github.job }}
63- url : ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
64- status : ${{ job.status }}
58+ - name : Slack Notification (Always)
59+ if : always()
60+ run : |
61+ MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
62+ REPO="${{ github.repository }}"
63+ LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
64+ PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
65+ curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
6566
66- - name : Google Chat Notification (Error)
67+ - name : Slack Notification (Error)
6768 if : failure()
68- uses : Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
69- with :
70- name : ${{ github.job }}
71- url : ${{ secrets.GOOGLE_CHAT_WEBHOOK_ERRORS }}
72- status : ${{ job.status }}
69+ run : |
70+ MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
71+ REPO="${{ github.repository }}"
72+ LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
73+ PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
74+ curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
0 commit comments