Skip to content

Commit 5cc64a3

Browse files
committed
Add Discord notification workflow for commits
Introduces a GitHub Actions workflow to send commit notifications to a Discord channel using a webhook. The workflow triggers on all branch pushes and includes customizable message formatting and appearance.
1 parent 1d7b0d2 commit 5cc64a3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Discord Commit Notification
2+
3+
on:
4+
push: # Triggers on all branches now
5+
6+
jobs:
7+
discord-notification:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0 # Fetch all history for proper commit info
14+
15+
- name: Discord Webhook
16+
uses: johnnyhuy/actions-discord-git-webhook@main
17+
with:
18+
# Replace this with your actual Discord webhook URL when ready
19+
# You can set this up as a repository secret named DISCORD_WEBHOOK_URL
20+
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
21+
# Optional customizations:
22+
repo_name: "Perspective at" # Custom repository name
23+
color: "#FFFF00" # Color of the Discord embed (yellow in hexadecimal)
24+
hide_links: false # Set to true if you want to hide links
25+
message_title: "New commit in at" # Custom title without emojis
26+
include_emojis: false # Disable emojis in the message
27+
message_format: "{full_name} - {message}" # Clean format with full username and message

0 commit comments

Comments
 (0)