Skip to content

Commit

Permalink
add broken link checker action
Browse files Browse the repository at this point in the history
Take broken link checker action from CAPM3 and add it here as well.
  • Loading branch information
tuminoid committed Apr 19, 2023
1 parent ba106d4 commit c15fdd6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check Markdown links

on:
pull_request:
types: [opened, edited, synchronize, reopened]
paths:
- '**.md'

permissions:
contents: read

jobs:
markdown-link-check:
name: Broken Links
# This workflow is only of value to the metal3-io repository and
# would always fail in forks
if: github.repository == 'metal3-io/baremetal-operator'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1
with:
use-quiet-mode: 'yes'
config-file: .markdownlinkcheck.json
18 changes: 18 additions & 0 deletions .markdownlinkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"ignorePatterns": [{
"pattern": "^http://localhost"
}],
"httpHeaders": [{
"comment": "Workaround as suggested here: https://github.com/tcort/markdown-link-check/issues/201",
"urls": ["https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}],
"timeout": "10s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206]
}

0 comments on commit c15fdd6

Please sign in to comment.