Related: lycheeverse/lychee#1637
This is what I got working:
.github/lychee-problem-matcher.json:
{
"problemMatcher": [
{
"owner": "lychee",
"pattern": [
{
"regexp": "^\\[(.*)\\]:$",
"file": 1
},
{
"regexp": "^\\s*\\[ERROR\\] (.*)$",
"message": 1,
"loop": true
}
]
}
]
}
- run: echo "::add-matcher::.github/lychee-problem-matcher.json"
- name: Link Checker
if: ${{ steps.changed-files.outputs.all_changed_files }}
uses: lycheeverse/lychee-action@v2.3.0
with:
fail: true
args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
format: compact
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NO_COLOR: 1
Resulting in this:


However the line number is missing in the output, so the annotation doesn't get added to the right place in the file
Related: lycheeverse/lychee#1637
This is what I got working:
.github/lychee-problem-matcher.json:{ "problemMatcher": [ { "owner": "lychee", "pattern": [ { "regexp": "^\\[(.*)\\]:$", "file": 1 }, { "regexp": "^\\s*\\[ERROR\\] (.*)$", "message": 1, "loop": true } ] } ] }Resulting in this:
However the line number is missing in the output, so the annotation doesn't get added to the right place in the file