Skip to content

v1.32.0 - Gavel AI Governance #50

v1.32.0 - Gavel AI Governance

v1.32.0 - Gavel AI Governance #50

Workflow file for this run

name: Validate Links
on:
release:
types: [published]
schedule:
# Run weekly on Sundays at 2 AM UTC
- cron: '0 2 * * 0'
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check links in README.md
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/link-check-config.json'
file-path: './README.md'
- name: Check links in index.md
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/link-check-config.json'
file-path: './index.md'
- name: Create issue if links are broken
if: failure()
uses: actions/github-script@v7
with:
script: |
const title = `🔗 Broken links detected - ${new Date().toISOString().split('T')[0]}`;
const body = `
## Broken Links Detected
The automated link checker has found broken links in the repository.
**Triggered by:** ${{ github.event_name }}
**Date:** ${new Date().toISOString()}
Please review the workflow logs for details about which links are broken:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
---
This issue was automatically created by the link validation workflow.
`;
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: body,
labels: ['bug', 'documentation']
});