From 6b283b0eee7ffca5dd696b69933fcf888f0b02aa Mon Sep 17 00:00:00 2001 From: Deva Chandragiri <122866331+Devazc@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:45:49 +0530 Subject: [PATCH 1/4] Add failure notification to Discord Add failure notification to Markdown Links Check workflow. --- .github/workflows/cron-weekly.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml index 8dafd4e99c27..de3b0ed8e044 100644 --- a/.github/workflows/cron-weekly.yml +++ b/.github/workflows/cron-weekly.yml @@ -17,3 +17,16 @@ jobs: # output full HTTP info for broken links use-verbose-mode: 'yes' config-file: '.github/workflows/markdown-link-check-config.json' + + # Notify to Discord channel on failure + - name: Send Discord message + uses: DiscordBotName/SendMessageAction@v1 + if: failure() + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} + message: "Markdown Links Check failed for branch ${{ github.event.pull_request.head.ref }}" + + + + + From 415dda8a7a922929705723f34a4b881fb496c623 Mon Sep 17 00:00:00 2001 From: Deva Chandragiri <122866331+Devazc@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:48:37 +0530 Subject: [PATCH 2/4] Add failure notification to Discord Add failure notification to Markdown Links Check workflow. --- .github/workflows/cron-weekly.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml index de3b0ed8e044..b2bcc9bf2de3 100644 --- a/.github/workflows/cron-weekly.yml +++ b/.github/workflows/cron-weekly.yml @@ -25,8 +25,3 @@ jobs: with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} message: "Markdown Links Check failed for branch ${{ github.event.pull_request.head.ref }}" - - - - - From 9fe42c92da72ab01b71cae9aa9fd102497220fa1 Mon Sep 17 00:00:00 2001 From: Deva Chandragiri <122866331+Devazc@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:52:15 +0530 Subject: [PATCH 3/4] Add Discord Notification sends a message to the #monitoring channel on Discord. --- .github/workflows/cron-weekly.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml index b2bcc9bf2de3..1528147aedd0 100644 --- a/.github/workflows/cron-weekly.yml +++ b/.github/workflows/cron-weekly.yml @@ -16,12 +16,9 @@ jobs: use-quiet-mode: 'yes' # output full HTTP info for broken links use-verbose-mode: 'yes' - config-file: '.github/workflows/markdown-link-check-config.json' - + config-file: '.github/workflows/markdown-link-check-config.json' # Notify to Discord channel on failure - - name: Send Discord message - uses: DiscordBotName/SendMessageAction@v1 - if: failure() - with: - webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - message: "Markdown Links Check failed for branch ${{ github.event.pull_request.head.ref }}" + - name: Send Discord Notification + if: failure() # Only run this step if previous steps failed + run: | + curl -H "Content-Type: application/json" -X POST -d '{"content":"The Markdown Links Check workflow has failed in the repository: [storybook]"}' [webhook-url] From 0bc34d476039dee665165ba0ec8c64e3962cfdf1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 28 Nov 2023 16:13:44 +0100 Subject: [PATCH 4/4] Update cron-weekly.yml --- .github/workflows/cron-weekly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml index 1528147aedd0..898d10ace803 100644 --- a/.github/workflows/cron-weekly.yml +++ b/.github/workflows/cron-weekly.yml @@ -21,4 +21,4 @@ jobs: - name: Send Discord Notification if: failure() # Only run this step if previous steps failed run: | - curl -H "Content-Type: application/json" -X POST -d '{"content":"The Markdown Links Check workflow has failed in the repository: [storybook]"}' [webhook-url] + curl -H "Content-Type: application/json" -X POST -d '{"content":"The Markdown Links Check workflow has failed in the repository: [storybook]"}' ${{ secrets.DISCORD_MONITORING_URL }}