Glob patterns were not properly evaluated for three reasons:
Quotes around globs were not preserved. As a result, unquoted wildcards were evaluated by bash instead of lychee
** patterns handled by the glob crate need to be prefixed with a separator, e.g. ./. See code here and here. We should probably switch to globset at some point, which doesn't have that limitation.
The lychee command itself needs to be executed with eval to make it find links. Otherwise it interprets the input argument (${ARGS[@]}) as a string and tries to find links within that string. (String input is supported by lychee). We want to interpret it as individual (whitespace-separated) arguments however. (Note that Github Actions doesn't support arrays as inputs, which prevents us from using array splitting.)
Recommended usage inside pipelines: Surround glob patterns with single quotes and prefix them with ./.
- name: Link Checker
uses: lycheeverse/lychee-action@v1.1.1
with:
# Check all Markdown and HTML files
args: --verbose --no-progress './**/*.md' './**/*.html'
For more context, see #67 and #68.
The examples have been updated accordingly.
Version 1.2.0
New inputs
Input
Example
Description
format
json
Use json as output format (instead of markdown)
output
/tmp/foo.json
Use different output filename
fail
true
Fail action on broken links
Full example config
- name: Link Checker
uses: lycheeverse/lychee-action@v1.2.0
with:
# Check all markdown and html files in repo (default)
args: --verbose --no-progress **/*.md **/*.html
# Use json as output format (instead of markdown)
format: json
# Use different output filename
output: /tmp/foo.txt
# Fail action on broken links
fail: true
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps lycheeverse/lychee-action from 1.1.0 to 1.2.1.
Release notes
Sourced from lycheeverse/lychee-action's releases.
Commits
768a131
Update CI to new glob syntax8602949
Prepare for release89aef46
Fix glob pattern support (#73)7c5c1f6
Add workflow triggersf76b841
Speed up CI: Only run "create issue" action on failure (#65)cbfe754
Add support for extra inputs (#64)515a3d3
Fix regression on having--format
onargs
input (#63)05dcb1d
Trigger run on PR53aae90
Rename checker id to lychee76a3616
Update README.md with method for failing the action (#62)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)