Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Periodic Link Checker #698

Periodic Link Checker

Periodic Link Checker #698

name: Periodic Link Checker
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress --max-concurrency 2 --exclude-mail --exclude-loopback './**/*.md'
output: ./lychee/out.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Find existing issue
id: find_issue
uses: micalevisk/last-issue-action@v2
if: ${{ steps.lychee.outputs.exit_code }} != 0
with:
state: open
labels: |
broken link
automated issue
- name: Create or update issue for broken links
uses: peter-evans/create-issue-from-file@v4
if: ${{ steps.lychee.outputs.exit_code }} != 0
with:
title: Link Checker Report
# If issue number is empty a new issue gets
issue-number: ${{ steps.find_issue.outputs.issue-number }}
content-filepath: ./lychee/out.md
labels: broken link, automated issue