chore: Don't fail broken links checker
This commit is contained in:
106
.github/workflows/broken-link-checker.yml
vendored
106
.github/workflows/broken-link-checker.yml
vendored
@@ -7,60 +7,60 @@
|
|||||||
name: Check for broken links
|
name: Check for broken links
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule: # Run every weekday at 12:30 UTC
|
schedule: # Run every weekday at 12:30 UTC
|
||||||
- cron: "30 12 * * 1-5"
|
- cron: '30 12 * * 1-5'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Check-for-broken-links:
|
Check-for-broken-links:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
env:
|
env:
|
||||||
issue-lookup-label: automated-link-issue
|
issue-lookup-label: automated-link-issue
|
||||||
issue-content: ./lychee-out.md
|
issue-content: ./lychee-out.md
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Restore lychee cache
|
- name: Restore lychee cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .lycheecache
|
path: .lycheecache
|
||||||
key: cache-lychee-${{ github.sha }}
|
key: cache-lychee-${{ github.sha }}
|
||||||
restore-keys: cache-lychee-
|
restore-keys: cache-lychee-
|
||||||
- name: Link Checker
|
- name: Link Checker
|
||||||
id: lychee
|
id: lychee
|
||||||
uses: lycheeverse/lychee-action@v1.10.0
|
uses: lycheeverse/lychee-action@v1.10.0
|
||||||
with:
|
with:
|
||||||
fail: true
|
fail: false
|
||||||
args: --verbose --no-progress --exclude-file .lycheeignore '**/*.md'
|
args: --verbose --no-progress --exclude-file .lycheeignore '**/*.md'
|
||||||
output: ${{ env.issue-content }}
|
output: ${{ env.issue-content }}
|
||||||
|
|
||||||
# Permissions (issues: read)
|
# Permissions (issues: read)
|
||||||
- name: "Look for an existing issue"
|
- name: 'Look for an existing issue'
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
id: last-issue
|
id: last-issue
|
||||||
uses: micalevisk/last-issue-action@v2
|
uses: micalevisk/last-issue-action@v2
|
||||||
# Find the last updated open issue with a `automated-issue` label:
|
# Find the last updated open issue with a `automated-issue` label:
|
||||||
with:
|
with:
|
||||||
state: open
|
state: open
|
||||||
labels: ${{ env.issue-lookup-label }}
|
labels: ${{ env.issue-lookup-label }}
|
||||||
|
|
||||||
# Permissions (issues: write)
|
# Permissions (issues: write)
|
||||||
- name: "Create a new issue, or update an existing one"
|
- name: 'Create a new issue, or update an existing one'
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: peter-evans/create-issue-from-file@v4
|
uses: peter-evans/create-issue-from-file@v4
|
||||||
with:
|
with:
|
||||||
title: "docs: Broken links found"
|
title: 'docs: Broken links found'
|
||||||
content-filepath: ${{ env.issue-content }}
|
content-filepath: ${{ env.issue-content }}
|
||||||
# Update an existing issue if one was found (issue_number),
|
# Update an existing issue if one was found (issue_number),
|
||||||
# otherwise an empty value creates a new issue:
|
# otherwise an empty value creates a new issue:
|
||||||
issue-number: ${{ steps['last-issue']['outputs']['issue-number'] }}
|
issue-number: ${{ steps['last-issue']['outputs']['issue-number'] }}
|
||||||
# Add a label(s) that `last-issue` can use to find this issue,
|
# Add a label(s) that `last-issue` can use to find this issue,
|
||||||
# and any other relevant labels for the issue itself:
|
# and any other relevant labels for the issue itself:
|
||||||
labels: |
|
labels: |
|
||||||
${{ env.issue-lookup-label }}
|
${{ env.issue-lookup-label }}
|
||||||
broken-link, docs
|
broken-link, docs
|
||||||
|
|||||||
Reference in New Issue
Block a user