File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Verify links
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - workflow/verify-links # TODO REMOVE
8+ repository_dispatch :
9+ workflow_dispatch :
10+ schedule :
11+ - cron : " 08 08 * * 1"
12+
13+ jobs :
14+ linkChecker :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ issues : write # required for peter-evans/create-issue-from-file
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Restore lychee cache
22+ uses : actions/cache@v4
23+ with :
24+ path : .lycheecache
25+ key : cache-lychee-${{ github.sha }}
26+ restore-keys : cache-lychee-
27+
28+ - name : Link Checker
29+ id : lychee
30+ uses : lycheeverse/lychee-action@v2
31+ with :
32+ # Exclude all private and local addresses in the check
33+ # Also exclude domains that actively block GitHub to send requests
34+ # Any Cockpit URLs it finds that have variables will be ignored too
35+ args : |
36+ --max-concurrency 1
37+ --retry-wait-time 60
38+ --exclude-all-private
39+ --exclude '^https://linux.die.net'
40+ --exclude '^.\{\{'
41+ --cache
42+ --cache-exclude-status 400..=599
43+ --max-cache-age 1d
44+ -v
45+ .
46+ token : ${{ secrets.GITHUB_TOKEN }}
47+
48+ - name : Find the last open report issue
49+ if : steps.lychee.outputs.exit_code != 0
50+ id : last-issue
51+ uses : micalevisk/last-issue-action@v2
52+ with :
53+ state : open
54+ labels : link-checker
55+
56+ - name : Update or create issue report
57+ if : steps.lychee.outputs.exit_code != 0 && steps.last-issue.outputs.has-found == 'true'
58+ uses : peter-evans/create-issue-from-file@v5
59+ with :
60+ title : Link Checker Report
61+ content-filepath : ./lychee/out.md
62+ issue-number : ${{ steps.last-issue.outputs.issue-number }}
63+ labels : link-checker
You can’t perform that action at this time.
0 commit comments