Skip to content

Merge branch 'master' of https://github.com/PranshulGG/WeatherMaster #10

Merge branch 'master' of https://github.com/PranshulGG/WeatherMaster

Merge branch 'master' of https://github.com/PranshulGG/WeatherMaster #10

Workflow file for this run

name: Send Commit Messages to Discord
on:
push:
branches:
- master
jobs:
notify-discord:
runs-on: ubuntu-latest
steps:
- name: Send Commit to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
LAST_COMMIT_MESSAGE=$(git log -1 --pretty=format:'%s')
LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an')
REPO_NAME=${{ github.repository }}
ACTOR=${{ github.actor }}
BRANCH=${{ github.ref_name }}
curl -X POST -H "Content-Type: application/json" \
-d "{
\"content\": \"${LAST_COMMIT_AUTHOR} pushed to ${REPO_NAME} on branch ${BRANCH}: ${LAST_COMMIT_MESSAGE}\"
}" \
$DISCORD_WEBHOOK