File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-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+ --base .
39+ --skip-missing
40+ --exclude-all-private
41+ --exclude '^https://linux.die.net'
42+ --exclude '^.\{\{'
43+ --cache
44+ --cache-exclude-status 400..=599
45+ --max-cache-age 1d
46+ -v
47+ .
48+ token : ${{ secrets.GITHUB_TOKEN }}
49+
50+ - name : Find the last open report issue
51+ if : steps.lychee.outputs.exit_code != 0
52+ id : last-issue
53+ uses : micalevisk/last-issue-action@v2
54+ with :
55+ state : open
56+ labels : link-checker
57+
58+ - name : Update or create issue report
59+ if : steps.lychee.outputs.exit_code != 0 && steps.last-issue.outputs.has-found == 'true'
60+ uses : peter-evans/create-issue-from-file@v5
61+ with :
62+ title : Link Checker Report
63+ content-filepath : ./lychee/out.md
64+ issue-number : ${{ steps.last-issue.outputs.issue-number }}
65+ labels : link-checker
You can’t perform that action at this time.
0 commit comments