-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug: not possible to output JSON to file #198
Comments
Thanks for the report @jasongitmail! We only wrote the output to file in case of error ( I don't know why we did that. It's a remnant of the original (now deprecated) action code from Instead, we'll always write an output file now. Apologies for the inconvenience. |
Unfortunately, there seems to still be something awry. I tested Then I also ran |
Ah, so you overwrite - name: Link Checker
uses: lycheeverse/lychee-action@master
with:
args: --output foo.txt ... If so, this is a bit tricky, because it is currently not used. - name: Link Checker
uses: lycheeverse/lychee-action@master
with:
# Check all markdown and html files in repo (default)
args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'
# Use json as output format (instead of markdown)
format: json
# Use different output file path <-- That's what you're looking for
output: /tmp/foo.json This puts the output into Can you try that? If it's not possible, I can change it such that it uses Lines 18 to 22 in 5a5fc0b
But first, I'd like to learn if setting If I misunderstood, can you paste your workflow here? |
Oh sorry, yeah let me try that. I was using the args version |
Working with that syntax! Thanks for the fix! |
Thanks for the feedback. 👍 Since this seems to be a common footgun, I might still change the entrypoint to also check |
There seems to be bug that prevents outputting JSON to a file. Could it be the lack of
INPUT_OUTPUT
withinaction.yml
, given it defaults the value of output currently to--output ${LYCHEE_TMP}
?My workaround is to run the lychee action step to install it, but then to follow with a separate step using lychee:
- run: lychee <otherArgs> --format json --output ./links.json
.The text was updated successfully, but these errors were encountered: