2021-05-25 14:39:09 +02:00
|
|
|
name: 'Notify on Push'
|
|
|
|
description: 'Notify Matrix room'
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
room:
|
|
|
|
description: 'Matrix Room ID'
|
|
|
|
required: true
|
|
|
|
token:
|
|
|
|
description: 'Matrix Token'
|
|
|
|
required: true
|
|
|
|
message:
|
|
|
|
description: 'Message to send'
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- shell: bash
|
2021-05-25 15:47:44 +02:00
|
|
|
run: |
|
2021-05-25 16:23:59 +02:00
|
|
|
curl -s -XPOST -d "$( echo "${{ inputs.message }}" | jq -Rsc '{"msgtype": "m.text", "body":@text}' )" "https://matrix.org/_matrix/client/r0/rooms/%21${{ inputs.room }}/send/m.room.message?access_token=${{ inputs.token }}" > /dev/null
|