-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor discord.js to support message embeds and create Test workflow
- Loading branch information
1 parent
b4628aa
commit aa78736
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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_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 |
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