Skip to content

Commit

Permalink
Add slack notifications to workflow run (#6)
Browse files Browse the repository at this point in the history
* Add slack notifications to workflow run

* Add explicit fail step to test notification

* Remove explicit fail step
  • Loading branch information
paddycarey authored Jun 30, 2020
1 parent 56dd811 commit 3d9a800
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

0 comments on commit 3d9a800

Please sign in to comment.