55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: Lychee Link Checker
|
|
|
|
on:
|
|
repository_dispatch:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "00 18 * * *"
|
|
pull_request:
|
|
|
|
jobs:
|
|
check_links:
|
|
name: Check for Broken Links
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
github.repository == 'a2aproject/A2A'
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Get relevant changed files
|
|
id: changed-files
|
|
if: github.event_name == 'pull_request'
|
|
uses: tj-actions/changed-files@v47
|
|
with:
|
|
files: |
|
|
**/*.md
|
|
**/*.mdx
|
|
**/*.html
|
|
**/*.htm
|
|
**/*.rst
|
|
**/*.txt
|
|
|
|
- name: Run Lychee on changed files (PR)
|
|
if: github.event_name == 'pull_request' && steps.changed-files.outputs.all_changed_files != ''
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: --no-progress ${{ steps.changed-files.outputs.all_changed_files }}
|
|
failIfEmpty: false
|
|
|
|
- name: Run Lychee on all files (Scheduled/Manual)
|
|
if: github.event_name != 'pull_request'
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: --no-progress .
|
|
failIfEmpty: false
|
|
|
|
- name: Create Issue on Failure
|
|
if: failure() && github.event_name != 'pull_request'
|
|
uses: peter-evans/create-issue-from-file@v6
|
|
with:
|
|
title: Link Checker Report
|
|
content-filepath: ./lychee/out.md
|
|
labels: report, automated issue
|