Skip to content

Commit deb7525

Browse files
committed
Scope markdown link checks on PRs
1 parent 7fcc206 commit deb7525

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/check-links.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@ name: Check Markdown links
22

33
on:
44
workflow_dispatch:
5-
push:
65
pull_request:
76
schedule:
87
- cron: "0 0 1 * *"
98

109
jobs:
11-
markdown-link-check:
10+
markdown-link-check-pr:
11+
if: github.event_name == 'pull_request'
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@master
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
18+
with:
19+
config-file: '.github/mlc_config.json'
20+
check-modified-files-only: 'yes'
21+
base-branch: 'main'
22+
23+
markdown-link-check-full:
24+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
1528
- uses: gaurav-nelson/github-action-markdown-link-check@v1
1629
with:
1730
config-file: '.github/mlc_config.json'

0 commit comments

Comments
 (0)