Use GitHub Actions
info
Official Roam GitHub Actions are available in the public repository WonderInventions/actions.
Overview
Use Roam GitHub Actions to integrate your CI/CD pipelines with Roam. Post build notifications, deployment status updates, or any other workflow events directly to Roam channels.
Available Actions
post-message
Send a message to a Roam chat from your GitHub Actions workflow.
Repository: WonderInventions/actions/post-message
Usage
- uses: WonderInventions/actions/post-message@master
with:
api-key: ${{ secrets.ROAM_API_KEY }}
chat-id: ${{ vars.DEVOPS_CHAT_ID }}
text: "Build completed successfully!"
Inputs
| Input | Required | Description |
|---|---|---|
api-key | Yes | Your Roam API key (store as a GitHub secret) |
chat-id | Yes | The chat ID to post to (group or channel) |
text | Yes | Message content (supports Markdown) |
Setup
1. Create an API Key
- Go to Roam Administration > Developer > API Keys
- Create a new key with the
chat:send_messagescope - Copy the key
2. Configure GitHub Secrets
- In your GitHub repository, go to Settings > Secrets and variables > Actions
- Add a new secret named
ROAM_API_KEYwith your API key - Optionally, add a variable
DEVOPS_CHAT_IDwith your target chat/group ID
3. Find Your Chat ID
To find a group's chat ID:
- Open the group in Roam
- Click the group name to open settings
- Copy the Group ID (format:
G-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
Examples
Build Notification
name: Build and Notify
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: npm run build
- name: Notify Roam
if: always()
uses: WonderInventions/actions/post-message@master
with:
api-key: ${{ secrets.ROAM_API_KEY }}
chat-id: ${{ vars.DEVOPS_CHAT_ID }}
text: |
**Build ${{ job.status }}** for `${{ github.repository }}`
Branch: `${{ github.ref_name }}`
Commit: `${{ github.sha }}`
[View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
Deployment Status
- name: Notify Deployment
uses: WonderInventions/actions/post-message@master
with:
api-key: ${{ secrets.ROAM_API_KEY }}
chat-id: ${{ vars.DEVOPS_CHAT_ID }}
text: |
:rocket: **Deployed to production**
Version: `${{ github.ref_name }}`
Environment: Production
Related
- Send Message API - API reference for the underlying endpoint