Skip to content

Commit cba3b21

Browse files
committed
docs(testing): document link-checker binary release process
Add comprehensive documentation for maintainers on how to: - Create releases in docs-tooling (automated) - Manually distribute binaries to docs-v2 (required for private repo) - Update workflow references when needed This addresses the missing process documentation for link-checker binary distribution between the two repositories. 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 ddb9a55 commit cba3b21

File tree

3 files changed

+110
-1
lines changed

3 files changed

+110
-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 }}

TESTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,47 @@ cargo build --release
171171
cp target/release/link-checker /usr/local/bin/
172172
```
173173

174+
#### Binary Release Process
175+
176+
**For maintainers:** To create a new link-checker release in docs-v2:
177+
178+
1. **Create release in docs-tooling** (builds and releases binary automatically):
179+
```bash
180+
cd docs-tooling
181+
git tag link-checker-v1.2.x
182+
git push origin link-checker-v1.2.x
183+
```
184+
185+
2. **Manually distribute to docs-v2** (required due to private repository access):
186+
```bash
187+
# Download binary from docs-tooling release
188+
curl -L -H "Authorization: Bearer $(gh auth token)" \
189+
-o link-checker-linux-x86_64 \
190+
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-v1.2.x/link-checker-linux-x86_64"
191+
192+
curl -L -H "Authorization: Bearer $(gh auth token)" \
193+
-o checksums.txt \
194+
"https://github.com/influxdata/docs-tooling/releases/download/link-checker-v1.2.x/checksums.txt"
195+
196+
# Create docs-v2 release
197+
gh release create \
198+
--repo influxdata/docs-v2 \
199+
--title "Link Checker Binary v1.2.x" \
200+
--notes "Link validation tooling binary for docs-v2 GitHub Actions workflows." \
201+
link-checker-v1.2.x \
202+
link-checker-linux-x86_64 \
203+
checksums.txt
204+
```
205+
206+
3. **Update workflow reference** (if needed):
207+
```bash
208+
# Update .github/workflows/pr-link-check.yml line 98 to use new version
209+
sed -i 's/link-checker-v[0-9.]*/link-checker-v1.2.x/' .github/workflows/pr-link-check.yml
210+
```
211+
212+
> [!Note]
213+
> The manual distribution is required because docs-tooling is a private repository and the default GitHub token doesn't have cross-repository access for private repos.
214+
174215
#### Core Commands
175216

176217
```bash

0 commit comments

Comments
 (0)