filiph / linkcheck

Fast link checker
https://pub.dartlang.org/packages/linkcheck
MIT License
403 stars 51 forks source link

Fix passing multiple arguments to github action #82

Closed errnesto closed 3 years ago

errnesto commented 3 years ago

I messed up my original contribution… When one would pass more than one argument e.g. arguments: 'example.com --skip-file skipfile.txt' to the github action it would fail with:

FormatException: example.com%20--skipfile%20skipfile.txt is not a valid link-local address but contains %. Scope id should be used as part of link-local address. (at character 13) example.com%20--skipfile%20skipfile.txt

This is because github action arguments can only be strings, but when we pass them as args to the dockerfile the docker cmd looks like this: cmd=["https://qa.ems.press --skipfile hui.txt"]

The workaround I found is overwriting the docker entrypoint via the actions file. There I can just expand the inputs.arguments variable…

This should close #72

errnesto commented 3 years ago

Shure it would also be cool to pass arguments as real "github actions arguments" but I think then a entrypoint.sh script or something like that would be needed to map that input to the linkcheck command… And that just seems more complicated :-)

filiph commented 3 years ago

Sorry, I didn't see this earlier. Thank you!

andrenarchy commented 2 years ago

@filiph Could you create a release so we can start using this? Thank you! :)

filiph commented 2 years ago

Thanks for the nudge! The new version (2.0.20) is in flight.