Skip to content

Commit 2598641

Browse files
committed
feat(ci): update link-checker to v1.2.2 and add manual sync workflow
- Update pr-link-check.yml to use link-checker-v1.2.2 with latest fixes - Add sync-link-checker-binary.yml for manual binary distribution - Improvements in v1.2.2: base URL detection, anchor validation, JSON parsing The v1.2.2 release fixes the Hugo base URL detection issue and improves anchor link validation that was tested in this PR.
1 parent ba3d8fe commit 2598641

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

.github/workflows/pr-link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
curl -L -H "Accept: application/vnd.github+json" \
9696
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
9797
-o link-checker-info.json \
98-
"https://api.github.com/repos/influxdata/docs-v2/releases/tags/link-checker-v1.0.0"
98+
"https://api.github.com/repos/influxdata/docs-v2/releases/tags/link-checker-v1.2.2"
9999
100100
# Extract download URL for linux binary
101101
DOWNLOAD_URL=$(jq -r '.assets[] | select(.name | test("link-checker.*linux")) | .url' link-checker-info.json)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Sync Link Checker Binary from docs-tooling
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Link checker version to sync (e.g., v1.2.2)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
sync-binary:
13+
name: Sync link-checker binary from docs-tooling
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Download binary from docs-tooling release
18+
run: |
19+
echo "Downloading link-checker ${{ inputs.version }} from docs-tooling..."
20+
21+
# Download binary from docs-tooling release
22+
curl -L -H "Accept: application/octet-stream" \
23+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
24+
-o link-checker-linux-x86_64 \
25+
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-${{ inputs.version }}/link-checker-linux-x86_64"
26+
27+
# Download checksums
28+
curl -L -H "Accept: application/octet-stream" \
29+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
30+
-o checksums.txt \
31+
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-${{ inputs.version }}/checksums.txt"
32+
33+
# Verify downloads
34+
ls -la link-checker-linux-x86_64 checksums.txt
35+
36+
- name: Create docs-v2 release
37+
run: |
38+
echo "Creating link-checker-${{ inputs.version }} release in docs-v2..."
39+
40+
gh release create \
41+
--title "Link Checker Binary ${{ inputs.version }}" \
42+
--notes "Link validation tooling binary for docs-v2 GitHub Actions workflows.
43+
44+
This binary is distributed from the docs-tooling repository release link-checker-${{ inputs.version }}.
45+
46+
### Usage in GitHub Actions
47+
48+
The binary is automatically downloaded by docs-v2 workflows for link validation.
49+
50+
### Manual Usage
51+
52+
\`\`\`bash
53+
# Download and make executable
54+
curl -L -o link-checker https://github.com/influxdata/docs-v2/releases/download/link-checker-${{ inputs.version }}/link-checker-linux-x86_64
55+
chmod +x link-checker
56+
57+
# Verify installation
58+
./link-checker --version
59+
\`\`\`
60+
61+
### Changes in ${{ inputs.version }}
62+
63+
See the [docs-tooling release](https://github.com/influxdata/docs-tooling/releases/tag/link-checker-${{ inputs.version }}) for detailed changelog." \
64+
link-checker-${{ inputs.version }} \
65+
link-checker-linux-x86_64 \
66+
checksums.txt
67+
env:
68+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)