-
Notifications
You must be signed in to change notification settings - Fork 564
62 lines (54 loc) · 1.82 KB
/
Copy pathlinkcheck.yaml
File metadata and controls
62 lines (54 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Link checks
on:
workflow_dispatch:
schedule:
- cron: "00 18 1 * *"
pull_request:
permissions: {}
env:
# Single definition to simplify any future changes to the linkcheck configuration.
LYCHEE_ARGS: --accept '100..=103,200..=299,401,403,429,999' --verbose --no-progress .
jobs:
linkchecker-pr:
if: ${{ github.event_name == 'pull_request' }}
name: PR - Link Checker
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Link Checker
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: ${{ env.LYCHEE_ARGS }}
fail: false
jobSummary: true
linkchecker-scheduled:
if: ${{ github.event_name != 'pull_request' }}
name: Monthly Link Checker
runs-on: ubuntu-latest
permissions:
contents: read
# required for peter-evans/create-issue-from-file
issues: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: ${{ env.LYCHEE_ARGS }}
# Do not fail scheduled runs; report by issue when links are broken.
fail: false
jobSummary: true
- name: Create Issue From File
if: ${{ steps.lychee.outputs.exit_code != 0 }}
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue