Skip to content

Commit 65629ef

Browse files
committed
Workflow: Add slack notification upon release published
1 parent 9c28d1c commit 65629ef

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Slack notification for new theme release
2+
3+
on:
4+
pull_request:
5+
# workflow_run:
6+
# workflows:
7+
# - "documentation preview"
8+
# types: [completed]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
release-notification:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
actions: read # for 8398a7/action-slack
19+
checks: read
20+
steps:
21+
- name: Send notification
22+
uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0
23+
with:
24+
status: custom
25+
custom_payload: |
26+
{
27+
username: 'Github',
28+
mention: 'channel',
29+
attachments: [{
30+
title: `New theme release - SOME RELEASE NAME`,
31+
color: '#009223',
32+
fields: [{
33+
title: 'Preview',
34+
value: `SOME PREVIEW LINK`,
35+
short: false
36+
},
37+
{
38+
title: 'Tag',
39+
value: `SOME RELEASE TAG NAME`,
40+
short: true
41+
},
42+
{
43+
title: 'Author',
44+
value: `SOME RELEASE AUTHOR`,
45+
short: true
46+
},
47+
{
48+
title: 'Preview URL',
49+
value: `SOME PREVIEW URL`,
50+
short: true
51+
}]
52+
}]
53+
}
54+
env:
55+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)