From 51dc1f38a7fb80ec399f30f4a2b6c6122aad9ad4 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 28 Mar 2022 07:26:33 +0000 Subject: [PATCH] ci: update global workflows --- .github/workflows/link-check-cron.yml | 29 +++++++++++++++++++++++++++ .github/workflows/link-check-pr.yml | 17 ++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/link-check-cron.yml create mode 100644 .github/workflows/link-check-pr.yml diff --git a/.github/workflows/link-check-cron.yml b/.github/workflows/link-check-cron.yml new file mode 100644 index 0000000..f7fabcd --- /dev/null +++ b/.github/workflows/link-check-cron.yml @@ -0,0 +1,29 @@ +name: Check Markdown links (Weekly) + +on: + workflow_dispatch: + schedule: + # At 00:00 UTC on every Monday + - cron: '0 0 * * 0' + +jobs: + External-link-validation-weekly: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + # Checks the status of hyperlinks in .md files + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + + - name: Report workflow run status to Slack + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,action,eventName,ref,workflow + env: + SLACK_DOCS_CHANNEL: ${{ secrets.SLACK_DOCS_CHANNEL }} + if: failure() # Only, on failure, send a message on the Slack Docs Channel (if there are broken links) diff --git a/.github/workflows/link-check-pr.yml b/.github/workflows/link-check-pr.yml new file mode 100644 index 0000000..f678ed1 --- /dev/null +++ b/.github/workflows/link-check-pr.yml @@ -0,0 +1,17 @@ +name: Check Markdown links + +on: + pull_request_target: + types: [synchronize, ready_for_review, opened, reopened] + +jobs: + External-link-validation-on-PR: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + check-modified-files-only: 'yes' #Only modified files are checked on PRs