Skip to content

juztcode/gitter-github-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitter notify - Github action

A GitHub Action to send a message to a Gitter room.

Example

gitter-github-action-example

Usage

You can use this action after any other action. Here is an example setup of this action:

  1. Create a .github/workflows/gitter-notify.yml file in your GitHub repo.
  2. 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 }}
  1. Create GITTER_ROOM_ID and GITTER_TOKEN secrets using GitHub Action's Secret.
  2. You can get Gitter personal access token from Gitter Developer Page.

Inputs

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