Skip to content

Commit 9ec9172

Browse files
committed
Introduce lychee link checker (instead of liche) (#436)
Introduce lychee link checker (to fix issues with rate limiting on checks of github links with old liche link checker). Uses a more explicit link ignore list in `.lycheeignore` which is easier to understand. Adding some badges for this GHA and others to the README (for fun). Also giving this GHA a simpler name: Link Check
1 parent 80a0121 commit 9ec9172

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/link-checker.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# from: https://github.com/marketplace/actions/link-checker
2-
# link checker used is 'liche': https://github.com/raviqqe/liche
1+
# from: https://github.com/lycheeverse/lychee-action
2+
# link checker used is 'lychee': https://github.com/lycheeverse/lychee
33

4-
name: Link Check on Patterns and README
4+
name: Link Check
55

66
on:
77
push:
@@ -16,11 +16,20 @@ jobs:
1616
linkChecker:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
20-
- name: Link Checker
21-
id: lc
22-
uses: peter-evans/link-checker@v1
23-
with:
24-
args: -v -d . -x "http://creativecommons.org/licenses|https://isc-inviter.herokuapp.com|https://github.com/rcs/rcs-viewer/pull/81|fearlesschangepatterns.com|https://ulir.ul.ie/bitstream/handle/10344/4443/Stol_2014_inner.pdf|https://docs.github.com/en/rest/metrics/statistics|https://docs.github.com/en/rest/search#search-repositories" README.md patterns/ book/ translation/ -r
25-
- name: Fail if there were link errors
26-
run: exit ${{ steps.lc.outputs.exit_code }}
19+
- uses: actions/checkout@v3
20+
21+
- name: Restore lychee cache
22+
uses: actions/cache@v3
23+
with:
24+
path: .lycheecache
25+
key: cache-lychee-${{ github.sha }}
26+
restore-keys: cache-lychee-
27+
28+
- name: Link Checker
29+
uses: lycheeverse/lychee-action@v1.5.0
30+
with:
31+
args: --verbose --no-progress --cache --max-cache-age 1d README.md patterns/ book/ translation/
32+
fail: true
33+
jobSummary: true
34+
env:
35+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.lycheeignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# These links are ignored by our link checker https://github.com/lycheeverse/lychee
2+
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
3+
https://example.com/link/to/your/trusted/committer/documentation.md
4+
https://github.com/rcs/rcs-viewer/pull/81
5+
http://creativecommons.org/licenses
6+
https://isc-inviter.herokuapp.com
7+
fearlesschangepatterns.com
8+
https://ulir.ul.ie/bitstream/handle/10344/4443/Stol_2014_inner.pdf
9+
.*@andrew.clegg.*

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![Check Links](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/link-checker.yml/badge.svg)](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/link-checker.yml)
2+
[![Pattern Syntax Validation](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/lint-patterns.yml/badge.svg)](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/lint-patterns.yml)
3+
14
# InnerSource Patterns
25

36
<a href="https://patterns.innersourcecommons.org">

0 commit comments

Comments
 (0)