-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add slack notifications on release outcome
- Loading branch information
1 parent
25f21a8
commit c3de895
Showing
5 changed files
with
146 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 'Release Notifier' | ||
|
||
inputs: | ||
os-name: | ||
description: 'OS name (e.g. Linux, Android)' | ||
required: true | ||
version: | ||
description: 'Semantic version string for this release (e.g. 4.0.0-alpha.0)' | ||
required: true | ||
status: | ||
description: 'Final status of the release job (available values: success, failure, cancelled)' | ||
required: true | ||
slack_oauth_token: | ||
description: 'OAuth token for our Slack bot' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: 'Success Notification' | ||
uses: actions-ecosystem/action-slack-notifier@v1 | ||
if: ${{ inputs.status == 'success' }} | ||
with: | ||
slack_token: ${{ inputs.slack_oauth_token }} | ||
username: Github Actions | ||
color: green | ||
verbose: true | ||
message: | | ||
Release Success - `${{ inputs.os-name }} ${{ inputs.version }}` | ||
channel: releases | ||
|
||
- name: 'Failure Notification' | ||
uses: actions-ecosystem/action-slack-notifier@v1 | ||
if: ${{ inputs.status == 'failure' }} | ||
with: | ||
slack_token: ${{ inputs.slack_oauth_token }} | ||
username: Github Actions | ||
color: red | ||
verbose: true | ||
message: | | ||
Release Failed - `${{ inputs.os-name }} ${{ inputs.version }}` | ||
channel: releases | ||
|
||
- name: 'Cancelled Notification' | ||
uses: actions-ecosystem/action-slack-notifier@v1 | ||
if: ${{ inputs.status == 'cancelled' }} | ||
with: | ||
slack_token: ${{ inputs.slack_oauth_token }} | ||
username: Github Actions | ||
color: yellow | ||
verbose: true | ||
message: | | ||
Release Cancelled - `${{ inputs.os-name }} ${{ inputs.version }}` | ||
channel: releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters