https://github.com/nhomble/groupme-notify-action
github action to send groupme messages
https://github.com/nhomble/groupme-notify-action
Last synced: 3 months ago
JSON representation
github action to send groupme messages
- Host: GitHub
- URL: https://github.com/nhomble/groupme-notify-action
- Owner: nhomble
- License: mit
- Created: 2021-01-10T00:29:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T06:01:57.000Z (over 3 years ago)
- Last Synced: 2024-03-14T22:09:45.396Z (about 1 year ago)
- Language: Shell
- Size: 37.1 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
:toc: macro
= groupme-notify-actionimage:https://github.com/nhomble/groupme-notify-action/workflows/Linter/badge.svg[Linter]
[.lead]
a github action to send groupme messagestoc::[]
== Examples
This action supports two styles of messaging.1. You can create a link:https://dev.groupme.com/bots[bot] associated with that group and just invoke the bot apis with your token and botId.
2. Directly with the GroupMe groupId and your access token, you can message a group with your identity.We recommend you go with option (1) since you'll typically receive notifications on your GroupMe client from a bot but not from yourself.
=== Message with a bot
image:https://user-images.githubusercontent.com/3923558/104136448-23f49a80-5364-11eb-9fd7-6ecd269c4577.png[Message with bot]
[source,yml]
----name: groupme-notify
on: [push]jobs:
groupme:
runs-on: ubuntu-latest
name: notify
steps:
- name: Checkout
uses: actions/checkout@v2
- name: do notification as bot
uses: nhomble/groupme-notify-action@v1
id: bot
with:
bot: ${{ secrets.YOUR_BOT_ID }}
message: "It's a bot!"
token: ${{ secrets.YOUR_API_KEY }}
----=== Message as yourself
image:https://user-images.githubusercontent.com/3923558/104116315-7b075a80-52e5-11eb-9fde-212fcd937675.png[Message yourself]
[source,yml]
----
name: groupme-notify
on: [push]jobs:
groupme:
runs-on: ubuntu-latest
name: notify
steps:
- name: Checkout
uses: actions/checkout@v2
- name: do notification
uses: nhomble/groupme-notify-action@v1
id: notification
with:
group: ${{ secrets.YOUR_GROUP_ID }}
message: 'Test notification!'
token: ${{ secrets.YOUR_API_KEY }}
----**Note**: you can define both the `group` and `bot` parameter in your yml. This action will give precedence to the **bot mode** so
that `group` parameter will be ignored.== GroupMe Specifics
You will want to visit https://dev.groupme.com/docs/v3[GroupMe API] for exhaustive documentation.=== How do I create a bot?
Through the link:https://dev.groupme.com/bots[GroupMe Dev] portal, you can click the **Create Bot** button. From the UI, the **Bot ID** parameter
is what you need to pass to this action.=== What is the groupId?
You'll need to perform a GET against the GroupMe APIs to find the `groupId` for the group you want. After you login, you
can retrieve your access token from the UI.Given your access token, you can get a list of all the groups you are a part of by doing:
[source,bash]
----
$ TOKEN=
$ curl \
-H "Content-Type: application/json" \
https://api.groupme.com/v3/groups?token=$TOKEN
----What you care about is:
[source,json]
----
{
"response": [
{"id": "", "name": "GitHub", "...": "..."},
{"id": "123456", "name": "Family", "...": "..."},
{"id": "789023", "name": "Friends", "...": "..."}
]
}
----Based off of the name, figure out the groupId you want to use and then put that into your `action.yml`.