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:
parent
9bc28f6bc6
commit
f40cad5ee2
17
.github/workflows/markdown.yml
vendored
17
.github/workflows/markdown.yml
vendored
@ -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
16
.markdown-link.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ignorePatterns": [
|
||||
{
|
||||
"pattern": "^http(s)?://localhost"
|
||||
}
|
||||
],
|
||||
"replacementPatterns": [
|
||||
{
|
||||
"pattern": "^/registry",
|
||||
"replacement": "https://opentelemetry.io/registry"
|
||||
}
|
||||
],
|
||||
"retryOn429": true,
|
||||
"retryCount": 5,
|
||||
"fallbackRetryDelay": "30s"
|
||||
}
|
Loading…
Reference in New Issue
Block a user