Skip to content

Schedule - Link Checker #768

Schedule - Link Checker

Schedule - Link Checker #768

---
name: Schedule - Link Checker
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
link-checker:
name: Link Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Generate Token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Link Checker
uses: lycheeverse/lychee-action@v1.10.0
id: lychee
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
- name: Find Link Checker Issue
id: link-checker-issue
uses: micalevisk/last-issue-action@v2
with:
state: open
labels: |
link-checker
- name: Update Issue
uses: peter-evans/create-issue-from-file@v5
with:
title: Broken links detected in docs
issue-number: "${{ steps.link-checker-issue.outputs.issue-number }}"
content-filepath: ./lychee/out.md
token: "${{ steps.generate-token.outputs.token }}"
labels: |
link-checker