Skip to content

bythope/discord-webhook-messages

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

Repository files navigation

GitHub GitHub tag Discord

The goal of this action is to produce helpful messages on your Discord server based on GitHub events.

Supported events:

  • Release
  • Pull Request
  • Push (branches / tags)
  • Page build

Getting Started:

Inputs


webhookUrl

The webhook URL to use. This should be in a repository secret and the secret should be included here using ${{ secrets.DISCORD_WEBHOOK }}. For security reasons it is not possible to default this to the secret name, so it must be supplied in every action invocation.

handler

Handler defines background logic of the action. Currently avaiable handlers:

  • release: Publishes message to your discord server when release is created.
  • push: Publishes message to your discord server when push action occurs.

Example

Release Handler

name: Discord Webhook Messages
on:
  release:
    types: [published]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run Discord Webhook
        uses: bythope/[email protected]
        with:
          webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
          handler: 'release'

Push Handler

name: Discord Webhook Messages
on:
  push:
    branches: 
      - '*'
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run Discord Webhook
        uses: bythope/[email protected]
        with:
          webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
          handler: 'push'

Contributing

Resolve an issue

  1. Read CONTRIBUTING guide
  2. Make the changes
  3. Read Pull request guide

Create feature request

  1. Create issue for an idea
  2. Explain your needs