mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
Add Slack notification workflow
This commit is contained in:
parent
d73f49bd24
commit
8d218dddaa
32
.github/workflows/slack-notify.yml
vendored
Normal file
32
.github/workflows/slack-notify.yml
vendored
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user