[pre-commit.ci] pre-commit autoupdate #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |