Skip to content

Commit d4e4b91

Browse files
committed
[chore] Check links in CHANGELOG when updating it
1 parent 313ee2a commit d4e4b91

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/changelog.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,22 @@ jobs:
6666
make chlog-validate \
6767
|| { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; }
6868
69-
# In order to validate any links in the yaml file, render the config to markdown
70-
- name: Render .chloggen changelog entries
71-
run: make chlog-preview > changelog_preview.md
69+
check-links:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: dorny/paths-filter@v3
73+
id: changes
74+
with:
75+
filters: |
76+
changelog:
77+
- 'CHANGELOG.md'
7278
- name: Install markdown-link-check
79+
if: steps.changes.outputs.changelog == 'true'
7380
run: npm install -g markdown-link-check
7481
- name: Run markdown-link-check
82+
if: steps.changes.outputs.changelog == 'true'
7583
run: |
7684
markdown-link-check \
7785
--verbose \
7886
--config .github/workflows/check_links_config.json \
79-
changelog_preview.md \
80-
|| { echo "Check that anchor links are lowercase"; exit 1; }
87+
CHANGELOG.md

0 commit comments

Comments
 (0)