Skip to content

check links

check links #736

Workflow file for this run

name: check links
on:
repository_dispatch: {}
workflow_dispatch: {}
schedule:
- cron: "00 18 * * *"
permissions: read-all
jobs:
check-links:
runs-on: ubuntu-22.04
permissions:
issues: write
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Restore lychee cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
with:
args: "--cache --max-cache-age 3d ."
env:
GITHUB_TOKEN: ${{secrets.github-token}}
- name: Look for an existing issue
id: last-issue
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
with:
state: open
labels: lychee link check
- name: Create Issue From File
if: ${{ steps.lychee.outputs.exit_code != 0 }}
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
issue-number: ${{ steps.last-issue.outputs.issue-number }}
labels: lychee link check