-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 1.59 KB
/
main.yml
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
50
51
52
53
54
55
56
57
58
59
name: ReleaseNotice
on:
push:
tags:
- '*'
jobs:
build:
runs-on: alpine-latest
steps:
# To check the github context
- name: Dump Github context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Slack Notification on SUCCESS
if: success()
uses: tokorom/action-slack-incoming-webhook@main
env:
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
text: A release is published.
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.event.push.tag_name}} is published!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Author:*\n${{ github.actor }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Information:*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.push.body) }}
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event.push.html_url }}"
}
}
]