Resume-Comparator / .github /workflows /discord_notif.yml
pradyumn tendulkar
Update discord_notif.yml
bc4eb9f unverified
raw
history blame contribute delete
733 Bytes
name: Discord Notification
on:
push:
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Send Discord notification with commit details
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
COMMIT_URL="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR.\nCommit: $GITHUB_SHA\nMessage: $COMMIT_MESSAGE\nURL: $COMMIT_URL\"}" \
$DISCORD_WEBHOOK_URL
shell: bash