Skip to content

Commit d16b3a1

Browse files
authored
ci: add alert on publish failure (#114)
1 parent 6ff24e1 commit d16b3a1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ jobs:
1616
w3up-proof: ${{ secrets.W3UP_PROOF }}
1717
w3name-private-key: ${{ secrets.W3NAME_PRIVATE_KEY }}
1818
w3name-revision: ${{ secrets.W3NAME_REVISION }}
19+
- if: failure()
20+
uses: slackapi/[email protected]
21+
with:
22+
method: chat.postMessage
23+
token: ${{ secrets.SLACK_BOT_TOKEN }}
24+
payload: |
25+
{
26+
"channel": "alerts",
27+
"text": "Publishing `${{ github.event.repository.name }}` failed",
28+
"blocks": [
29+
{
30+
"type": "section",
31+
"text": {
32+
"type": "mrkdwn",
33+
"text": ":warning: *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Publishing `${{ github.event.repository.name }}` failed>*"
34+
}
35+
}
36+
]
37+
}
1938
- uses: slackapi/[email protected]
2039
with:
2140
channel-id: spark-public

0 commit comments

Comments
 (0)