-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.38 KB
/
slack-notify.yml
File metadata and controls
49 lines (45 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Notify Slack Channel
on:
release:
types: [ created ]
permissions:
contents: read
jobs:
deploy-tag:
name: Notify Slack
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: Send message to Slack channel
id: slack
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
PROJECT_NAME: rudder-integration-braze-android
with:
channel-id: "${{ secrets.SLACK_RELEASE_CHANNEL_ID }}"
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "New release: ${{ env.PROJECT_NAME }}"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Release: <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}>*"
}
}
]
}