GitHub Action
Gitter Notify
v2
Latest version
A GitHub Action to send a message to a Gitter room.
Example
You can use this action after any other action. Here is an example setup of this action:
- Create a
.github/workflows/gitter-notify.yml
file in your GitHub repo. - Add the following code to the
gitter-notify.yml
file.
on: [push]
jobs:
send_message:
runs-on: ubuntu-latest
name: Send test message
steps:
- id: initial
uses: juztcode/gitter-github-action@v1
with:
room-id: ${{ secrets.GITTER_ROOM_ID }}
token: ${{ secrets.GITTER_TOKEN }}
text: Pending
- uses: juztcode/gitter-github-action@v1
with:
room-id: ${{ secrets.GITTER_ROOM_ID }}
token: ${{ secrets.GITTER_TOKEN }}
text: Success
message-id: ${{ steps.initial.outputs.message-id }}
- Create
GITTER_ROOM_ID
andGITTER_TOKEN
secrets using GitHub Action's Secret. - You can get Gitter personal access token from Gitter Developer Page.
Input | Purpose |
---|---|
room-id | Specify Gitter room id in which message needs to be sent |
token | Personal access token of a user who has permission to send messages to above mentioned Gitter room. |
text | Message text need to be displayed (Ref, EventName and ActionUrl will be automatically added to the message). |
message-id | Privide message id if you want to replace existing message. Otherwise gitter notify action will return submitted message id and you can access it via step outputs. |
At the moment Gitter developer api does not provide option to reset personal access token