Skip to content

Commit

Permalink
Update discord_notification.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soulsyrup authored Oct 10, 2023
1 parent ab4b980 commit c5cd4d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/discord_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ jobs:

- name: Send Discord notification to Server 1
env:
WEBHOOK_URL_1: ${{ secrets.WEBHOOK_URL }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
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/EEG-Chaos-Kuramoto-Neural-Net/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" $WEBHOOK_URL
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit! Check out the latest changes: https://github.com/Metaverse-Crowdsource/EEG-Chaos-Kuramoto-Neural-Net/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" https://discord.com/api/webhooks/$DISCORD_WEBHOOK_ID/$DISCORD_WEBHOOK_TOKEN
- name: Send Discord notification to Server 2
env:
WEBHOOK_URL_2: ${{ secrets.URC_WEBHOOK_URL }}
URC_WEBHOOK_ID: ${{ secrets.URC_WEBHOOK_ID }}
URC_WEBHOOK_TOKEN: ${{ secrets.URC_WEBHOOK_TOKEN }}
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/EEG-Chaos-Kuramoto-Neural-Net/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" $URC_WEBHOOK_URL
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit! Check out the latest changes: https://github.com/Metaverse-Crowdsource/EEG-Chaos-Kuramoto-Neural-Net/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" https://discord.com/api/webhooks/$URC_WEBHOOK_ID/$URC_WEBHOOK_TOKEN

0 comments on commit c5cd4d9

Please sign in to comment.