Home

Awesome

Gollum Page Watcher GitHub Action

<a href="https://github.com/benmatselby/gollum-page-watcher-action/actions"><img alt="status" src="https://github.com/benmatselby/gollum-page-watcher-action/workflows/Go/badge.svg"></a> Go Report Card

A GitHub Action to watch for GitHub Wiki Page changes, and then notify a Slack channel

Secrets

Environment Variables

Example

...
- name: Wiki Watcher
  uses: benmatselby/gollum-page-watcher-action@v1
  env:
    SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    SLACK_CHANNEL: #random
    SLACK_USERNAME: Gollum
    PAGES_TO_WATCH: (^Home$)|(^Meeting minutes)
...

This will result in a match on "Home", and all pages with a title starting with "Meeting minutes".

Output

Testing

To test this, you can run it from your command line with the following setup

GITHUB_EVENT_PATH=example-payloads/valid-payload.json \
GITHUB_EVENT_NAME=gollum \
SLACK_WEBHOOK=[your-slack-webhook-url] \
SLACK_CHANNEL=[your-slack-channel] \
DEBUG=true \
go run main.go

If DEBUG is defined, it will not post to Slack, but rather output the webhook message in your terminal.

Gollum