Skip to content

Introduce lychee link checker (instead of liche) #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# from: https://github.com/marketplace/actions/link-checker
# link checker used is 'liche': https://github.com/raviqqe/liche
# from: https://github.com/lycheeverse/lychee-action
# link checker used is 'lychee': https://github.com/lycheeverse/lychee

name: Link Check on Patterns and README
name: Link Check

on:
push:
Expand All @@ -16,11 +16,20 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
id: lc
uses: peter-evans/link-checker@v1
with:
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
- name: Fail if there were link errors
run: exit ${{ steps.lc.outputs.exit_code }}
- uses: actions/checkout@v3

- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Link Checker
uses: lycheeverse/lychee-action@v1.5.0
with:
args: --verbose --no-progress --cache --max-cache-age 1d README.md patterns/ book/ translation/
fail: true
jobSummary: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
9 changes: 9 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These links are ignored by our link checker https://github.com/lycheeverse/lychee
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
https://example.com/link/to/your/trusted/committer/documentation.md
https://github.com/rcs/rcs-viewer/pull/81
http://creativecommons.org/licenses
https://isc-inviter.herokuapp.com
fearlesschangepatterns.com
https://ulir.ul.ie/bitstream/handle/10344/4443/Stol_2014_inner.pdf
.*@andrew.clegg.*
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Check Links](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/link-checker.yml/badge.svg)](https://github.com/InnerSourceCommons/InnerSourcePatterns/actions/workflows/link-checker.yml)
[![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)

# InnerSource Patterns

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