TEST - Send Discord Hook #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: withStudioCMS Test Send Discord Hook | |
on: | |
workflow_dispatch: | |
jobs: | |
post-message: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: "withstudiocms/automations" | |
ref: "main" | |
path: "automation" | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Send message on Discord | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_TEST_HOOK }} | |
DISCORD_MESSAGE: "Test message from GitHub Actions" | |
DISCORD_MESSAGE_EMBEDS: > | |
[ | |
{ | |
"id": 661098315, | |
"description": "Just a test message from GitHub Actions.", | |
"fields": [], | |
"author": { | |
"name": "withStudioCMS Test Bot", | |
"icon_url": "https://github.com/withstudiocms/studiocms.dev/blob/main/assets/logo-discord.png?raw=true" | |
}, | |
"title": "Hello, world!", | |
} | |
] | |
run: node automation/scripts/discord.js |