Skip to content

Commit

Permalink
Add Slack notification workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
prnk28 committed Jan 11, 2025
1 parent d73f49b commit 8d218dd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Slack Notifications

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
issues:
types: [opened, closed, reopened]
discussion:
types: [created, answered]
release:
types: [published]

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: sonr-github
SLACK_COLOR: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && 'good' || 'warning' }}
SLACK_ICON: https://github.com/onsonr.png?size=48
SLACK_MESSAGE: |
Repository: ${{ github.repository }}
Event: ${{ github.event_name }}
Actor: ${{ github.actor }}
Ref: ${{ github.ref }}
SLACK_TITLE: GitHub Activity
SLACK_USERNAME: GitHub Bot

0 comments on commit 8d218dd

Please sign in to comment.