Skip to content

Update discord-notification.yml #4

Update discord-notification.yml

Update discord-notification.yml #4

name: Notify Discord on Labeled Discussion
on:
discussion:
types: [created]
jobs:
notify-discord:
runs-on: ubuntu-latest
if: contains(github.event.discussion.labels.*.name, 'show-and-tell')
steps:
- name: Dump GitHub event payload
run: echo "${{ toJson(github.event) }}"
- name: Send Notification to Discord

Check failure on line 15 in .github/workflows/discord-notification.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/discord-notification.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"A new labeled discussion has been created: ${{ github.event.discussion.html_url }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}