Merge pull request #1 from officialblake/officialblake-develop #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify Discord on Push or Merge | |
on: | |
push: | |
branches: | |
- main | |
- 'release/*' | |
pull_request: | |
types: [closed] | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send Discord notification | |
run: | | |
REPO_NAME=$(basename ${{ github.repository }}) | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "$(jq -n --arg content "Changes in **$REPO_NAME** | |
**Commit by:** ${{ github.actor }} | |
**Message:** ${{ github.event.head_commit.message }} | |
**[View Commit](${{ github.event.head_commit.url }})**" \ | |
'{"content":$content}')" \ | |
${{ secrets.DISCORD_WEBHOOK_URL }} |