Skip to content

Commit b596fbd

Browse files
committed
chore: Merge branch 'main' into feat/failure-success-notifications
2 parents da97a8b + b00c3b1 commit b596fbd

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

send-slack-notification/README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1-
# send-slack-notification
1+
# `send-slack-notification`
2+
3+
> Manifest: [send-slack-notification/action.yaml][send-slack-notification]
4+
5+
This action sends a Slack message to notify about container image build failures and successes.
6+
Subsequent attempts of the same workflow run are automatically threaded in Slack.
7+
The color of the message is automatically selected based on the provided results.
8+
9+
Example usage (workflow):
10+
11+
```yaml
12+
jobs:
13+
notify:
14+
name: Failure Notification
15+
needs: [job_1, job_2]
16+
runs-on: ubuntu-latest
17+
if: failure() || github.run_attempt > 1
18+
steps:
19+
- name: Send Notification
20+
uses: stackabletech/actions/send-slack-notification
21+
with:
22+
build-result: ${{ needs.job_2.result }}
23+
publish-manifests-result: ${{ needs.job_2.result }}
24+
slack-token: ${{ secrets.MY_SECRET }}
25+
```
26+
27+
## Inputs and Outputs
28+
29+
> [!TIP]
30+
> For descriptions of the inputs and outputs, see the complete [send-slack-notification] action.
31+
32+
### Inputs
33+
34+
- `channel-id` (defaults to `C07UG6JH44F`)
35+
- `build-result` (required, e.g. `success`)
36+
- `publish-manifests-result` (required, e.g. `failure`)
37+
- `slack-token` (required)
38+
39+
### Outputs
40+
41+
None
42+
43+
[send-slack-notification]: ./action.yaml

0 commit comments

Comments
 (0)