Skip to content

build(deps-dev): bump vite from 7.2.6 to 7.3.2 (#403) #10

build(deps-dev): bump vite from 7.2.6 to 7.3.2 (#403)

build(deps-dev): bump vite from 7.2.6 to 7.3.2 (#403) #10

name: Discord Push Notification
on:
push:
branches: [main]
jobs:
notify-discord:
runs-on: ubuntu-latest
steps:
- name: Send Discord Notification
env:
WEBHOOK_URL: ${{ secrets.DISCORD_ANNOUNCEMENTS_WEBHOOK }}
run: |
COMMIT_MSG=$(echo '${{ github.event.head_commit.message }}' | head -1)
COMMIT_URL="${{ github.event.head_commit.url }}"
AUTHOR="${{ github.event.head_commit.author.username }}"
COMPARE="${{ github.event.compare }}"
COMMIT_MSG_JSON=$(printf '%s' "$COMMIT_MSG" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))')
curl -sf -X POST \
-H 'Content-Type: application/json' \
-d "{
\"embeds\": [{
\"title\": \"New update pushed to main\",
\"description\": $COMMIT_MSG_JSON,
\"url\": \"$COMPARE\",
\"color\": 5732594,
\"fields\": [
{\"name\": \"Author\", \"value\": \"$AUTHOR\", \"inline\": true}
],
\"footer\": {\"text\": \"GitHub Push\"},
\"timestamp\": \"${{ github.event.head_commit.timestamp }}\"
}]
}" \
"$WEBHOOK_URL"