diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 95d54da7bb..9ca83772a1 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -75,9 +75,7 @@ jobs: || { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; } # In order to validate any links in the yaml file, render the config to markdown - - name: Render .chloggen changelog entries + - name: Run markdown-link-check on the changelog run: | - make chlog-preview 2> changelog_preview.md - cat changelog_preview.md - - name: Run markdown-link-check - run: make markdown-link-check-changelog-preview + make chlog-preview &> changelog_preview.md + make markdown-link-check-changelog-preview diff --git a/.lychee.toml b/.lychee.toml index 672bacfeb9..38599eea36 100644 --- a/.lychee.toml +++ b/.lychee.toml @@ -5,7 +5,8 @@ accept = ["200..=299", "403"] exclude = [ "^https://www.foo.bar", # excluding links to pull requests and issues is done for performance - "^https://github.com/open-telemetry/semantic-conventions/(pull|issue)/\\d+$" + "^https://github.com/open-telemetry/semantic-conventions/(pull|issues)/\\d+$", + "^https://github.com/open-telemetry/opentelemetry-specification/(pull|issues)/\\d+$" ] # better to be safe and avoid failures diff --git a/Makefile b/Makefile index a04d6aa7e9..722b76edbe 100644 --- a/Makefile +++ b/Makefile @@ -73,13 +73,18 @@ markdown-link-check: lycheeverse/lychee \ --config home/repo/.lychee.toml \ --root-dir /home/repo \ - -v \ + --verbose \ home/repo .PHONY: markdown-link-check-changelog-preview markdown-link-check-changelog-preview: - @if ! npm ls markdown-link-check; then npm install; fi - npx --no -- markdown-link-check --quiet --config .markdown_link_check_config.json changelog_preview.md; + docker run --rm \ + --mount 'type=bind,source=$(PWD),target=/home/repo' \ + lycheeverse/lychee \ + --config /home/repo/.lychee.toml \ + --root-dir /home/repo \ + --verbose \ + home/repo/changelog_preview.md # This target runs markdown-toc on all files that contain # a comment .