File tree Expand file tree Collapse file tree 2 files changed +50
-2
lines changed Expand file tree Collapse file tree 2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ jobs:
55
55
steps :
56
56
- name : Post to a Slack channel
57
57
id : slack
58
- uses : slackapi/slack-github-action@v1.25 .0
58
+ uses : slackapi/slack-github-action@v1.26 .0
59
59
with :
60
60
channel-id : ' deployments'
61
61
payload : |
62
62
{
63
+ "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
63
64
"blocks": [
64
65
{
65
66
"type": "section",
69
70
}
70
71
},
71
72
{
72
- "type": "section",
73
+ "type": "section"
73
74
"text": {
74
75
"type": "mrkdwn",
75
76
"text": "Project: `${{ github.event.repository.name }}`"
Original file line number Diff line number Diff line change 23
23
run : npm run publish:lib
24
24
env :
25
25
NODE_AUTH_TOKEN : ${{secrets.npm_token}}
26
+
27
+ slack_notification :
28
+ needs :
29
+ - build
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Post to a Slack channel
33
+ id : slack
34
+
35
+ with :
36
+ channel-id : ' deployments'
37
+ payload : |
38
+ {
39
+ "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
40
+ "blocks": [
41
+ {
42
+ "type": "section",
43
+ "text": {
44
+ "type": "mrkdwn",
45
+ "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
46
+ }
47
+ },
48
+ {
49
+ "type": "section"
50
+ "text": {
51
+ "type": "mrkdwn",
52
+ "text": "Project: `${{ github.event.repository.name }}`"
53
+ }
54
+ },
55
+ {
56
+ "type": "section",
57
+ "text": {
58
+ "type": "mrkdwn",
59
+ "text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
60
+ }
61
+ },
62
+ {
63
+ "type": "section",
64
+ "text": {
65
+ "type": "mrkdwn",
66
+ "text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
67
+ }
68
+ }
69
+ ]
70
+ }
71
+ env :
72
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments