Skip to content

Commit

Permalink
add slack notif
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Jul 23, 2024
1 parent fbbfeab commit c579eeb
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/notif-push-to-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#https://docs.github.com/en/webhooks/webhook-events-and-payloads#push
name: notify-push
on:
push:
branches:
- develop
jobs:
notify:
runs-on: ubuntu-latest
if: github.event.pusher.name == 'bigorn0'
env:
AUTHOR: ${{ github.event.pusher.name }}
steps:
- name: notify
run: echo "${AUTHOR}"
- name: notify slack
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'develop-direct-pushes'
payload: |
{
"text": " ${{ github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Direct push to develop: ${{ github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit c579eeb

Please sign in to comment.