Comments (6)
Thanks for the feedback. 👍 Since this seems to be a common footgun, I might still change the entrypoint to also check args
for the output parameter, as described above. #201
from lychee-action.
Thanks for the report @jasongitmail!
We only wrote the output to file in case of error (exit code == 0
).
I don't know why we did that. It's a remnant of the original (now deprecated) action code from link-checker
:
https://github.com/peter-evans/link-checker/blame/ce2cdf3d3f679dca05554c43f493821b878e1b4d/entrypoint.sh
There probably was a good reason to do this in the old action, but for us, it's quite limiting, and so I removed that condition again.
Instead, we'll always write an output file now. Apologies for the inconvenience.
You can test it by using lycheeverse/lychee-action@master
and if all goes well, please report back. I'll release a new version then. ✌️
from lychee-action.
Unfortunately, there seems to still be something awry.
I tested uses: lycheeverse/lychee-action@master
Then I also ran ls -la
for a number of directories after running lychee-action to try to find the file, in case it saved somewhere unexpected, but it wasn't anywhere to be found. I also tried a filename that does not have a directory in the path, since my actual path contains a dir, in case that made a difference, but same result. I'm using the same command that otherwise works with lychee directly as the args for the action.
from lychee-action.
Ah, so you overwrite --output
, in your args right?
So you have something like
- 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.
Instead, the recommended way is to set the additional output
argument for the action and not set it in args
:
- 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 /tmp/foo.json
. The default is lychee/out.md
, relative to the working directory of the action.
Can you try that?
If it's not possible, I can change it such that it uses --output
from the args
if it is set. This should avoid the confusion for users. We already do something similar for --format
:
Lines 18 to 22 in 5a5fc0b
But first, I'd like to learn if setting output: /tmp/foo.json
works for you.
If I misunderstood, can you paste your workflow here?
from lychee-action.
Oh sorry, yeah let me try that. I was using the args version
from lychee-action.
Working with that syntax! Thanks for the fix!
from lychee-action.
Related Issues (20)
- Typos in README HOT 1
- With two lychee-action steps in a row you get -> tar: lychee: Cannot open: File exists HOT 1
- Getting error "invalid type: boolean `false`, expected struct Verbosity" HOT 3
- Solution for "Error: Resource not accessible by integration" HOT 5
- Add default GitHub token HOT 2
- Link Checker Report
- Parse `--output` from `--args` similar to `--format`?
- Possible to verify external URLs? HOT 4
- feat: support using nightly version HOT 6
- Allow to store `.lycheeignore` in workflows folder HOT 5
- Q: Can we check a live website online as lychee can HOT 1
- Improved GHA workflow for centralising url status reporting in single GH issue HOT 3
- The `set-output` command is deprecated HOT 4
- How to `--dump` to file? HOT 11
- Setting `output` arg does not write results to disk HOT 4
- Update to v1.9: Failed to parse configuration HOT 1
- exclude does not support multiple?
- link.yml does not appear under GitHub actions HOT 4
- Specifying lycheeVersion as "nightly" broken HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lychee-action.