Skip to content

Commit

Permalink
add workflows actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Marshall committed Nov 6, 2024
1 parent c46204c commit d5cc631
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/discord-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store

0 comments on commit d5cc631

Please sign in to comment.