-
Notifications
You must be signed in to change notification settings - Fork 159
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
Make Actionlint Directly Invokable as an Action Itself #262
Comments
I'm also 👍 for this
It just makes live easier. I've been using it locally for a while, and now want to introduce it to the dev workflow. I was looking for an action of this linter, and couldn't find it. Nor was there any documentation on how to do it. This ticket was the first usable result. I believe the project should at least describe on how to use itself as a part of a GitHub workflow. Alternatively, would the project reference an other repo that maintains just the action? |
There is a whole section in the docs for this - https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions It is not directly in the README, but the README does link to USAGE under the DOCS section. |
I believe there is still a discoverability issue, as I only found those docs after creating my fork and experimenting with a root action.yml file. More importantly, those docs are rather technical and assume that the reader knows a lot about how to roll their own GitHub actions, not just use workflows. If coupling the official action to the main repo is undesirable, perhaps a separate repo with just the action.yml file could be used as @Bertg suggested? This would allow for more simple and targeted documentation in a more accessible place (i.e. the README) and refer to the existing docs for advanced usage. |
Not only will it improve discoverability, but it will allow for pinning the version of both |
Some guys couldn't sit quietly at home and publish unofficial actionlint actions on GitHub Marketplace. |
I chose to split out the version into a variable thats easily parseable by renovatebot: ..then have renovatebot maintain it: |
I completely forgot about this thread, but if there is still interest, I've created a pull request that implements this. I've been running this fork for almost a year with no problems so it should be safe, again, assuming that there is still anyone else that prefers this method over just using the docker image. |
Currently, there are two ways of running
actionlint
in a GitHub Action workflow:actionlint
and execute it from arun:
step:actionlint
from a docker containerBoth of these two options have some drawbacks. Option 1 requires either always running the download script from the main branch (which may be unstable), or specifying a stable tag (which needs to be manually updated when new versions are released as Dependabot won't suggest updates). Option 2 has the benefit of being tied to a stable version, e.g.
docker://rhysd/actionlint:v<TAG>
, however, it can only be configured by passing in theargs:
property as a monolithic string, instead of separate inputs with clear defaults and descriptions.One solution would be to add a
action.yml
file to the root that definesinputs:
and executesactionlint
internally. This could be done as a composite action (as was proposed in #257) or as a dockerized wrapper (which would forgo the need to run the download script). Essentially both of these would be wrapping up one or the other of the existing methods to runactionlint
from a workflow. The key benefits here are clearly defined inputs and enabling Dependabot updates.The possible downsides to adding an
action.yml
file, as pointed out by @rhysd in #257, is that this adds maintenance costs and is identical to just running one of the two existing methods.However, I believe that having a first party action would still add value. In addition to the aforementioned maintenance improvements to end users by enabling Dependabot and distinct
inputs:
, this would also addactionlint
to the GitHub actions marketplace.The text was updated successfully, but these errors were encountered: