Skip to content

Commit

Permalink
Create discord_notification.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soulsyrup authored Sep 13, 2023
1 parent 010e426 commit 37d01b7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/discord_notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Send discord notification
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Send Discord notification
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
COMMIT_DESCRIPTION=$(git log -1 --pretty=format:"%b")
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit! Check out the latest changes: https://github.com/Metaverse-Crowdsource/DarkFlow/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" $WEBHOOK_URL

0 comments on commit 37d01b7

Please sign in to comment.