filiph / linkcheck

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

Update GitHub Action (on 2.0.15+1 vs. 2.0.20) to get fixed versions #93

Closed nkuehn closed 2 years ago

nkuehn commented 2 years ago

Hi, I'm trying to call the GitHub action with multiple arguments, but if I get the changelog right that only works from version 2.0.20 onwards. But the latest action I can use from the marketplace is the one that is in the docs (2.0.15+1)

Using:

- name: Check links
  uses: filiph/linkcheck@v2.0.15+1
  with:
    arguments: --external --show-redirects --skip-file my-skip-list-file https://example.com

fails because the arguments are passed as one %-encoded argument. Maybe it's just a documentation problem how to pass multiple arguments to the GitHub action and how the versions relate.

I'm helping myself by directly addresssing the container to be able to work with the latest version but it feels hacky because undocumented

- name: Check links
  uses: docker://tennox/linkcheck:2.0.20
  with:
    args: --external --show-redirects --skip-file my-skip-list-file https://example.com

Given the simplicity of this solution it could be documented, too if there's some issue or blocker to automating the github action release on new releases.

filiph commented 2 years ago

Hi, thanks for this! I didn't realize I have to re-publish every version.

I just clicked some buttons here on github.com and the published action is 2.0.20. Let me know if this doesn't fix your issue.

emmenko commented 2 years ago

Using the latest version yields this error (no idea what that means):

image

Any idea what's wrong?

filiph commented 2 years ago

Gah, I have no idea what this mean, unfortunately. There is not even a line 16 in action.yml.

For SEO, the error says:

Error filiph/linkcheck/2.0.20/action.yml (Line: 16, Col: 5): A sequence was not expected
tooomm commented 2 years ago

Jep, running into the same issue sadly.

It does not work to implement the action in a regular way or copy e.g. the command from the marketplace:

- name: Check links with linkcheck
  uses: filiph/linkcheck@2.0.20

Therefore people are currently unable to use this great action out of the box and the important fix in 2.0.20 is not easily accessible.

The GitHub CI is failing after 3s for me:

 Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
Download action repository 'filiph/linkcheck@2.0.20' (SHA:69913d9df3600d9a165ab35380dfbe625f2ba617)
Error: filiph/linkcheck/2.0.20/action.yml (Line: 16, Col: 5): A sequence was not expected
Error: filiph/linkcheck/2.0.20/action.yml (Line: 16, Col: 5): A sequence was not expected
Error: System.ArgumentException: Unexpected type 'SequenceToken' encountered while reading 'entrypoint'. The type 'StringToken' was expected.
   at GitHub.DistributedTask.ObjectTemplating.Tokens.TemplateTokenExtensions.AssertString(TemplateToken value, String objectDescription)
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Fail to load filiph/linkcheck/2.0.20/action.yml

It looks like people using the action right now, manually install the 2.0.20 version from the repo and run the tool by hand in CI.

Can you please try to look into this? I've sadly no idea how pre-made Actions are build or properly distributed.

@errnesto Maybe you've any ideas here? We are lacking GitHub Actions knowledge here... and since you added it and made it work in the first place... :)