Skip to content

Merge pull request #111 from vmware/dependabot/pip/mkdocs-material-9.7.5 #26

Merge pull request #111 from vmware/dependabot/pip/mkdocs-material-9.7.5

Merge pull request #111 from vmware/dependabot/pip/mkdocs-material-9.7.5 #26

Workflow file for this run

name: Links
on:
push:
branches:
- main
pull_request:
branches:
- main
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 * * 1"
jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v6
- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v5
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --cache --max-cache-age 7d --verbose --no-progress './**/*.md'
fail: false
- name: Save lychee cache
uses: actions/cache/save@v5
if: always()
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Create or Update Issue
if: steps.lychee.outputs.exit_code != 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ISSUE_NUMBER=$(gh issue list --state open --label "automated issue" --search "Link Checker Report" --json number,title --jq '.[] | select(.title == "Link Checker Report") | .number' | head -1)
if [ -n "$ISSUE_NUMBER" ]; then
gh issue edit "$ISSUE_NUMBER" --body-file ./lychee/out.md
else
gh issue create --title "Link Checker Report" --body-file ./lychee/out.md --label "report" --label "automated issue"
fi