Added slack on failure

This commit is contained in:
Andy Miller 2020-12-07 16:19:34 -07:00
parent 19719ecac1
commit 29bcbf042f
No known key found for this signature in database
GPG Key ID: 2B07A47E470BCFDE

View File

@ -43,3 +43,22 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./grav-dist/*.zip"]'
slack:
name: Slack
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: 8398a7/action-slack@v3
with:
status: failure
fields: repo,message,author,action
icon_emoji: ':octocat:'
author_name: 'Github Action Build'
text: '🚚 Automated Build Failure'
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.WORKFLOW_CONCLUSION == 'failure'