-
Notifications
You must be signed in to change notification settings - Fork 9
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 to workflow run (#6)
* Add slack notifications to workflow run * Add explicit fail step to test notification * Remove explicit fail step
- Loading branch information
1 parent
56dd811
commit 3d9a800
Showing
1 changed file
with
20 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
- name: Wait for previous workflows to complete | ||
uses: softprops/turnstyle@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TURNSTYLE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
poll-interval-seconds: 10 | ||
|
||
|
@@ -34,3 +34,22 @@ jobs: | |
env: | ||
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | ||
CLOUDSMITH_NAMESPACE: terraform-provider-testing | ||
|
||
- name: Notify Slack on Success | ||
if: success() | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_ICON: https://avatars0.githubusercontent.com/u/44036562?s=200&v=4 | ||
SLACK_TITLE: Workflow Succeeded | ||
SLACK_USERNAME: Github Actions | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Notify Slack on Failure | ||
if: failure() | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_COLOR: danger | ||
SLACK_ICON: https://avatars0.githubusercontent.com/u/44036562?s=200&v=4 | ||
SLACK_TITLE: Workflow Failed | ||
SLACK_USERNAME: Github Actions | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |