From c8b5a9b8f579fcd228ee9380c1414b07f6a48b0b Mon Sep 17 00:00:00 2001 From: Todd Underwood Date: Thu, 12 Nov 2020 12:26:50 -0800 Subject: [PATCH] Add Slack Notifications (#78) --- .github/workflows/build-on-push.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index c5058a58..45c177c2 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -1,5 +1,13 @@ name: Build -on: [push] +on: + push: + branches: + - '*' + pull_request: + branches: + - master + schedule: + - cron: "0 22 * * 1" jobs: build-referee: runs-on: ubuntu-latest @@ -8,4 +16,14 @@ jobs: - uses: actions/setup-node@v1 - run: sudo apt-get -qq update - run: sudo apt-get install -y oathtool - - run: yarn prepare-artifacts \ No newline at end of file + - run: yarn prepare-artifacts + - name: Slack Notification on Master + if: ${{ failure() && github.ref == 'refs/heads/master'}} + uses: rtCamp/action-slack-notify@v2.1.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: referee-alerts + SLACK_MESSAGE: 'Cerberus main build has failed :build-failed:' + SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + SLACK_TITLE: Referee Build Failure Notification + SLACK_USERNAME: GitHub Actions \ No newline at end of file