Merge branch 'main' of github.com:ksiscute/bronxbot #1
This file contains hidden or 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: Discord Notification | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Discord Embed via Curl | |
| run: | | |
| PAYLOAD=$(jq -n --arg author "${{ github.actor }}" \ | |
| --arg message "${{ github.event.head_commit.message }}" \ | |
| --arg url "${{ github.event.head_commit.url }}" \ | |
| --arg timestamp "${{ github.event.head_commit.timestamp }}" \ | |
| '{ | |
| embeds: [ | |
| { | |
| title: "🔔 New Update", | |
| description: "[View Commit](\($url))", | |
| color: 3447003, | |
| fields: [ | |
| { name: "Author", value: $author }, | |
| { name: "Message", value: $message } | |
| ], | |
| timestamp: $timestamp | |
| } | |
| ] | |
| }') | |
| curl -X POST -H "Content-Type: application/json" \ | |
| -d "$PAYLOAD" \ | |
| ${{ secrets.DISCORD_WEBHOOK }} |