File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-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+ fail : false
33+ # Exclude all private and local addresses in the check
34+ # Also exclude domains that actively block GitHub to send requests
35+ # Any Cockpit URLs it finds that have variables will be ignored too
36+ args : |
37+ --max-concurrency 1
38+ --retry-wait-time 60
39+ --base .
40+ --skip-missing
41+ --exclude-all-private
42+ --exclude '^https://linux.die.net'
43+ --exclude 'file:///'
44+ --exclude 'domain.tld'
45+ --exclude '^.*\{\{'
46+ --exclude 'https://bodhi.fedoraproject.org/updates/cockpit-*'
47+ --cache
48+ --cache-exclude-status 400..=599
49+ --max-cache-age 1d
50+ -v
51+ .
52+ token : ${{ secrets.GITHUB_TOKEN }}
53+
54+ - name : Find the last open report issue
55+ if : steps.lychee.outputs.exit_code != 0
56+ id : last-issue
57+ uses : micalevisk/last-issue-action@v2
58+ with :
59+ state : open
60+ labels : link-checker
61+
62+ - name : Update or create issue report
63+ if : steps.lychee.outputs.exit_code != 0 && steps.last-issue.outputs.has-found == 'true'
64+ uses : peter-evans/create-issue-from-file@v5
65+ with :
66+ title : Link Checker Report
67+ content-filepath : ./lychee/out.md
68+ issue-number : ${{ steps.last-issue.outputs.issue-number }}
69+ labels : link-checker
You can’t perform that action at this time.
0 commit comments