File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ jobs:
5555 steps :
5656 - name : Post to a Slack channel
5757 id : slack
58- uses : slackapi/slack-github-action@v1.25 .0
58+ uses : slackapi/slack-github-action@v1.26 .0
5959 with :
6060 channel-id : ' deployments'
6161 payload : |
6262 {
63+ "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
6364 "blocks": [
6465 {
6566 "type": "section",
6970 }
7071 },
7172 {
72- "type": "section",
73+ "type": "section"
7374 "text": {
7475 "type": "mrkdwn",
7576 "text": "Project: `${{ github.event.repository.name }}`"
Original file line number Diff line number Diff line change 2323 run : npm run publish:lib
2424 env :
2525 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+ uses : slackapi/slack-github-action@v1.26.0
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