Skip to content

Commit 762f2d9

Browse files
committed
ci: split link checking into multiple jobs
1 parent 53ac2e9 commit 762f2d9

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check links in diffs
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
non-blog:
9+
uses: ./.github/workflows/pr-check-links-worker.yml
10+
with:
11+
glob_pattern: "--exclude-path content/blog/ ./content/ README.md"
12+
13+
blog_0-9a-f:
14+
uses: ./.github/workflows/pr-check-links-worker.yml
15+
with:
16+
glob_pattern: "./content/blog/[0-9a-f]*/"
17+
18+
blog_g-z:
19+
uses: ./.github/workflows/pr-check-links-worker.yml
20+
with:
21+
glob_pattern: "./content/blog/[g-z]*/"

.github/workflows/pr-check-links.yml renamed to .github/workflows/pr-check-links-worker.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: Check links in diffs
1+
name: Check links worker
22

33
on:
4-
pull_request:
5-
branches: [main]
4+
workflow_call:
5+
inputs:
6+
glob_pattern:
7+
required: true
8+
type: string
69

710
env:
811
TARGET_REPO_URL: https://github.com/espressif/developer-portal.git
@@ -48,9 +51,8 @@ jobs:
4851
args: |
4952
--dump
5053
--include-fragments
51-
--exclude-path ./themes/
52-
--exclude-path ./layouts/
53-
.
54+
--glob-ignore-case
55+
${{ inputs.glob_pattern }}
5456
output: links-baseline.txt
5557

5658
- name: Check out feature branch
@@ -93,9 +95,8 @@ jobs:
9395
args: |
9496
--no-progress
9597
--include-fragments
96-
--exclude-path ./themes/
97-
--exclude-path ./layouts/
98-
.
98+
--glob-ignore-case
99+
${{ inputs.glob_pattern }}
99100
fail: true # Fail action if broken links are found
100101

101102
- name: Suggestions

0 commit comments

Comments
 (0)