From dd4b3b419ff64bb96f10149e520f54b8afd74e53 Mon Sep 17 00:00:00 2001 From: Kuba Mazurek Date: Thu, 1 Jul 2021 13:15:12 +0200 Subject: [PATCH] Add Discord notification for failed goth nightlies --- .github/workflows/goth-nightly.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/goth-nightly.yml b/.github/workflows/goth-nightly.yml index 4fd16e506..c2cba70ef 100644 --- a/.github/workflows/goth-nightly.yml +++ b/.github/workflows/goth-nightly.yml @@ -83,8 +83,8 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: goth-logs - path: /tmp/goth-tests + name: goth-logs + path: /tmp/goth-tests # Only relevant for self-hosted runners - name: Remove test logs @@ -98,3 +98,15 @@ jobs: # In future we'll be able to use the `--all` flag here to remove envs for # all Python versions (https://github.com/python-poetry/poetry/issues/3208). run: poetry env remove python3.8 + + - name: Send Discord notification on failure + uses: Ilshidur/action-discord@0.3.2 + if: failure() + env: + BRANCH_NAME: ${{ matrix.branch }} + DISCORD_AVATAR: https://i.imgur.com/EOX16Mx.jpg + DISCORD_USERNAME: 'Goth night watch' + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + with: + args: 'Goth nightly run failed for `{{ EVENT_PAYLOAD.repository.full_name }}` on branch `{{ BRANCH_NAME }}`! {{ WORKFLOW_URL }}'