From 98ebb6f8d102db980abe9cbeb3954dd0bb9a6683 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 21 May 2021 16:24:56 +0200 Subject: [PATCH] CI: send push-related CI notifications to Matrix --- .github/workflows/push.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0889ea278..2a54f1600 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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