Skip to content

[pre-commit.ci] pre-commit autoupdate #134

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #134

Workflow file for this run

name: check
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- uses: lycheeverse/lychee-action@v1
with:
# Fail on pull request, but create an issue otherwise
fail: ${{ github.event_name == 'pull_request' }}
args: >-
--verbose
--no-progress
--config .github/config/lychee.toml
.
- name: Find last link-checker issue
id: link-checker-issue
uses: micalevisk/last-issue-action@v2
with:
state: open
labels: |
link-checker
- name: Create or update issue
if: env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
# Update an existing issue if one was found (issue-number),
# otherwise an empty value creates a new issue:
issue-number: "${{ steps.link-checker-issue.outputs.issue_number }}"
content-filepath: ./lychee/out.md
labels: automated issue, link-checker