From a945b9c6d0e702757d1a4ab05872265829344808 Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Tue, 16 Jul 2024 21:18:10 +0100 Subject: [PATCH] Update markdown links workflow --- .github/markdown/markdown-links.json | 7 ------- .github/workflows/markdown-links.yml | 31 +++++++++------------------- 2 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 .github/markdown/markdown-links.json diff --git a/.github/markdown/markdown-links.json b/.github/markdown/markdown-links.json deleted file mode 100644 index d85c1ac..0000000 --- a/.github/markdown/markdown-links.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "^https://opensource.org/licenses" - } - ] -} diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml index 6d6c059..d2b6bcb 100644 --- a/.github/workflows/markdown-links.yml +++ b/.github/workflows/markdown-links.yml @@ -1,17 +1,8 @@ name: Markdown links check on: - push: - branches: - - main pull_request: branches: - main - release: - types: - - published - schedule: - - cron: '0 18 * * 1' - workflow_dispatch: permissions: read-all @@ -19,23 +10,21 @@ jobs: markdown-links: name: Markdown links check runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Harden runner uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Check links in modified Markdown files if: github.event_name == 'pull_request' - uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15 - with: - base-branch: main - check-modified-files-only: yes - use-verbose-mode: yes - config-file: .github/markdown/markdown-links.json - - name: Check links in all Markdown files - if: github.event_name != 'pull_request' - uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15 + uses: umbrelladocs/action-linkspector@edd00b453149a11ab419183d1e8e46159e609ec0 # v1.1.3 with: - use-verbose-mode: yes - config-file: .github/markdown/markdown-links.json + fail_on_error: true + filter_mode: file + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review