bank interest #22
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 author_avatar "${{ github.actor_avatar_url }}" \ | |
| --arg message "${{ github.event.head_commit.message }}" \ | |
| --arg url "${{ github.event.head_commit.url }}" \ | |
| --arg timestamp "${{ github.event.head_commit.timestamp }}" \ | |
| --arg version "${{ secrets.VERSION }}" \ | |
| '{ | |
| "embeds": [ | |
| { | |
| "id": 120388608, | |
| "description": ("__**New Update**__\nA new update has been released!\n**V" + $version + "**\n" + $message + "\n*[View Full Changelog](" + $url + ")*"), | |
| "fields": [], | |
| "color": 3101622, | |
| "footer": { | |
| "icon_url": $author_avatar, | |
| "text": ("Pushed by " + $author) | |
| }, | |
| "timestamp": $timestamp | |
| } | |
| ] | |
| }') | |
| curl -X POST -H "Content-Type: application/json" \ | |
| -d "$PAYLOAD" \ | |
| "${{ secrets.DISCORD_WEBHOOK }}" |