CI: send push-related CI notifications to Matrix

This commit is contained in:
Adriaan de Groot 2021-05-21 16:24:56 +02:00
parent 7830461ac5
commit 98ebb6f8d1

View File

@ -78,18 +78,10 @@ jobs:
working-directory: ${{ env.BUILDDIR }}
run: make install VERBOSE=1
- name: "notify: ok"
uses: rectalogic/notify-irc@v1
if: ${{ success() && github.repository == 'calamares/calamares' }}
with:
server: chat.freenode.net
nickname: cala-ci
channel: "#calamares"
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}"
run: |
curl -s -XPOST -d '{"msgtype":"m.text", "body":"OK ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}"}' 'https://matrix.org/_matrix/client/r0/rooms/%21${{ secrets.MATRIX_ROOM }}/send/m.room.message?access_token=${{ secrets.MATRIX_TOKEN }}' > /dev/null
- name: "notify: fail"
uses: rectalogic/notify-irc@v1
if: ${{ failure() && github.repository == 'calamares/calamares' }}
with:
server: chat.freenode.net
nickname: cala-ci
channel: "#calamares"
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}\n.. DIFF ${{ github.event.compare }}"
run: |
curl -s -XPOST -d '{"msgtype":"m.text", "body": "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}\n.. DIFF ${{ github.event.compare }}" }' 'https://matrix.org/_matrix/client/r0/rooms/%21${{ secrets.MATRIX_ROOM }}/send/m.room.message?access_token=${{ secrets.MATRIX_TOKEN }}' > /dev/null