From 7bb7c2dc3bf01ace077440b10bceb8bdd2968924 Mon Sep 17 00:00:00 2001 From: Ibrahim Maga Date: Wed, 19 May 2021 18:43:00 -0700 Subject: [PATCH] add: workflow task to notify discord on failure (#4743) * add script to cd-publish to notify on failure * add script to cd-publish to notify on failure * modified notification message * update notification message --- .github/workflows/cd-publish.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-publish.yml b/.github/workflows/cd-publish.yml index f6f33212269..67a1092e29a 100644 --- a/.github/workflows/cd-publish.yml +++ b/.github/workflows/cd-publish.yml @@ -44,4 +44,15 @@ jobs: - name: Publish NPM packages env: NPM_SECRET_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn publish-ci -n $NPM_SECRET_TOKEN \ No newline at end of file + run: yarn publish-ci -n $NPM_SECRET_TOKEN + + - name: send notification message on failure + if: failure() + uses: appleboy/discord-action@master + with: + webhook_id: ${{ secrets.WEBHOOK_ID }} + webhook_token: ${{ secrets.WEBHOOK_TOKEN }} + username: "GitHub Automated notification" + message: "FAST publishing failed" + + \ No newline at end of file