Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
soulsyrup committed Dec 11, 2023
1 parent a6d34da commit 450783d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/discord_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Send Discord notification

- name: Send Discord notification to Server 1
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_DEV_SERVER_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_DEV_SERVER_TOKEN }}
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")
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
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit by $COMMIT_AUTHOR! Check out the latest changes: https://github.com/Metaverse-Crowdsource/DarkFlow/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:
URC_WEBHOOK_ID: ${{ secrets.DISCORD_DEV_SERVER_ID }}
URC_WEBHOOK_TOKEN: ${{ secrets.DISCORD_DEV_SERVER_TOKEN }}
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")
COMMIT_DESCRIPTION=$(git log -1 --pretty=format:"%b")
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit by $COMMIT_AUTHOR! Check out the latest changes: https://github.com/Metaverse-Crowdsource/DarkFlow/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" https://discord.com/api/webhooks/$DISCORD_DEV_SERVER_ID/$DISCORD_DEV_SERVER_TOKEN

0 comments on commit 450783d

Please sign in to comment.