1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-18 03:22:12 +02:00

Add markdown link check configuration and action (#1869)

* Add Markdown link check

* Add replacement for registry URL and clean ignored

* Fix config file name

* Update .markdown-link.json

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
Tyler Yahn 2021-05-02 14:15:42 +00:00 committed by GitHub
parent 9bc28f6bc6
commit f40cad5ee2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 0 deletions

View File

@ -19,6 +19,7 @@ jobs:
id: changes
run: |
echo "::set-output name=md::$(git diff --name-only --diff-filter=ACMRTUXB origin/${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
lint:
name: lint markdown files
runs-on: ubuntu-latest
@ -31,3 +32,19 @@ jobs:
uses: docker://avtodev/markdown-lint:v1
with:
args: ${{needs.changedfiles.outputs.md}}
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: 'main'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.markdown-link.json'
check-modified-files-only: 'yes'
folder-path: ''

16
.markdown-link.json Normal file
View File

@ -0,0 +1,16 @@
{
"ignorePatterns": [
{
"pattern": "^http(s)?://localhost"
}
],
"replacementPatterns": [
{
"pattern": "^/registry",
"replacement": "https://opentelemetry.io/registry"
}
],
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s"
}