From 8af5c9b0b1c47395093ca06d64876e9840e52d20 Mon Sep 17 00:00:00 2001 From: Frederic Mercier Date: Thu, 27 Jun 2024 09:14:51 +0200 Subject: [PATCH] DBACLD-139987 - put in place link check in Markdown files --- .github/workflows/check-links.yml | 25 +++++++++++++++++++++++++ .md_check_config.json | 14 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/check-links.yml create mode 100644 .md_check_config.json diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 0000000..2ea6949 --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,25 @@ +name: Check Markdown links + +#on: +# push: +# branches: +# - master +# pull_request: +# branches: [master] +on: push +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: technote-space/get-diff-action@v6 + with: + PATTERNS: | + **/**.md + + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + config-file: '.md_check_config.json' + diff --git a/.md_check_config.json b/.md_check_config.json new file mode 100644 index 0000000..9d513d9 --- /dev/null +++ b/.md_check_config.json @@ -0,0 +1,14 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost" + } + ], + "replacementPatterns": [ + { + "pattern": "^/LICENSE", + "replacement": "{{BASEURL}}/LICENSE" + } + ], + "timeout": "20s" + } \ No newline at end of file