diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml index 412e6a3cae4..31271c2e968 100644 --- a/.github/workflows/markdown.yml +++ b/.github/workflows/markdown.yml @@ -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: '' diff --git a/.markdown-link.json b/.markdown-link.json new file mode 100644 index 00000000000..f222ad89c31 --- /dev/null +++ b/.markdown-link.json @@ -0,0 +1,16 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http(s)?://localhost" + } + ], + "replacementPatterns": [ + { + "pattern": "^/registry", + "replacement": "https://opentelemetry.io/registry" + } + ], + "retryOn429": true, + "retryCount": 5, + "fallbackRetryDelay": "30s" +}