mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
Merge c380efa628 into f63bbec4ab
This commit is contained in:
commit
99d974f59b
3 changed files with 38 additions and 0 deletions
13
.github/workflows/markdown-links.yml
vendored
Normal file
13
.github/workflows/markdown-links.yml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
name: Check Markdown links
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
markdown-link-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
config-file: tools/markdown-link-check.json
|
||||
use-quiet-mode: yes
|
||||
5
tools/markdown-link-check.json
Normal file
5
tools/markdown-link-check.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"ignorePatterns": [
|
||||
{"pattern": "^https://github.com/icinga/icinga2/issues/"}
|
||||
]
|
||||
}
|
||||
20
tools/markdown-link-check.sh
Executable file
20
tools/markdown-link-check.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH="$(pwd)/node_modules/.bin:${PATH}"
|
||||
|
||||
errors=0
|
||||
|
||||
while read -r file; do
|
||||
if ! markdown-link-check --config tools/markdown-link-check.json --quiet "$file"; then
|
||||
(( errors++ )) || true
|
||||
fi
|
||||
done < <(find -name \*.md)
|
||||
|
||||
if [[ $errors -gt 0 ]]; then
|
||||
echo
|
||||
echo "Found ${errors} files with errors!"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in a new issue