-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.1 KB
/
test_send-discord-hook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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