File tree 1 file changed +14
-45
lines changed
1 file changed +14
-45
lines changed Original file line number Diff line number Diff line change 1
- name : ReleaseNotice
1
+ name : Release Notice
2
2
on :
3
3
release :
4
4
types : [published]
@@ -12,48 +12,17 @@ jobs:
12
12
env :
13
13
GITHUB_CONTEXT : ${{ toJSON(github) }}
14
14
run : echo "$GITHUB_CONTEXT"
15
- - name : Slack Notification on SUCCESS
16
- if : success()
17
- uses : tokorom/action-slack-incoming-webhook@main
18
- env :
19
- INCOMING_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
15
+ - name : Send custom JSON data to Slack workflow
16
+ id : slack
17
+
20
18
with :
21
- text : A release is published.
22
- blocks : |
23
- [
24
- {
25
- "type": "header",
26
- "text": {
27
- "type": "plain_text",
28
- "text": "${{ github.event.release.tag_name}} is published!"
29
- }
30
- },
31
- {
32
- "type": "section",
33
- "text": {
34
- "type": "mrkdwn",
35
- "text": "*Author:*\n${{ github.actor }}"
36
- }
37
- },
38
- {
39
- "type": "section",
40
- "text": {
41
- "type": "mrkdwn",
42
- "text": "*Information:*"
43
- }
44
- },
45
- {
46
- "type": "section",
47
- "text": {
48
- "type": "mrkdwn",
49
- "text": ${{ toJSON(github.event.release.body) }}
50
- }
51
- },
52
- {
53
- "type": "section",
54
- "text": {
55
- "type": "mrkdwn",
56
- "text": "${{ github.event.release.html_url }}"
57
- }
58
- }
59
- ]
19
+ # This data can be any valid JSON from a previous step in the GitHub Action
20
+ payload : |
21
+ {
22
+ "tag_name": "${{ github.event.release.tag_name}}",
23
+ "actor": "${{ github.actor }}",
24
+ "body": "${{ toJSON(github.event.release.body) }}",
25
+ "html_url": "${{ github.event.release.html_url }}"
26
+ }
27
+ env :
28
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_RELEASE }}
You can’t perform that action at this time.
0 commit comments