Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit d16b3a1

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

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.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/slack-github-action@v2.0.0
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/slack-github-action@v1.27.0
2039
with:
2140
channel-id: spark-public

0 commit comments

Comments
 (0)