From 29bcbf042ffda715ac534de5a85232b44c44c9a6 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 7 Dec 2020 16:19:34 -0700 Subject: [PATCH] Added slack on failure --- .github/workflows/build.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index af683a7f5..5ec057795 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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'