Skip to content

Check tools links

Check tools links #4

name: Check tools links
# Network-bound drift guard for tools/tools.json. Pings each tool's primary URL
# (and homepage, as a non-fatal warning) so a maintainer pass can re-verify or
# retire entries whose upstream moved. Not part of the blocking validate gate.
on:
schedule:
- cron: "0 8 1 * *" # 08:00 UTC on the 1st of each month
workflow_dispatch: {}
permissions:
contents: read
issues: write
jobs:
tools-links:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Check tools-catalog links
id: check
run: |
set +e
make tools-links
rc=$?
set -e
echo "exit=$rc" >> "$GITHUB_OUTPUT"
- name: Build link-triage note
if: steps.check.outputs.exit != '0'
run: python3 scripts/build-link-triage.py --out docs/LINK_TRIAGE.md
- name: Upload tools link-check report
if: always()
uses: actions/upload-artifact@v7
with:
name: tools-link-check
path: catalog/tools-link-check.json
- name: Upload triage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: tools-link-triage
path: docs/LINK_TRIAGE.md
triage-issue:
if: failure()
needs: tools-links
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Open tools-link-triage issue
uses: actions/github-script@v9
with:
script: |
const title = `[link-triage] Tools-catalog link check failed (${new Date().toISOString().slice(0,10)})`;
const body = require('fs').readFileSync('docs/LINK_TRIAGE.md', 'utf8');
const marker = '[link-triage] Tools-catalog link check failed';
const { data } = await github.rest.issues.listForRepo({
owner: context.repo.owner, repo: context.repo.repo, state: 'open', per_page: 20
});
const existing = data.find(i => i.title.startsWith(marker));
if (existing) {
await github.rest.issues.createComment({
owner: context.repo.owner, repo: context.repo.repo,
issue_number: existing.number, body
});
core.info(`updated existing triage issue #${existing.number}`);
} else {
const issue = await github.rest.issues.create({
owner: context.repo.owner, repo: context.repo.repo,
title, body, labels: ['link-triage']
});
core.info(`opened new triage issue #${issue.data.number}`);
}