Skip to content
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

Evaluate github.com/rhysd/actionlint for linting GH Actions workflow files #257

Open
smoya opened this issue Sep 7, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@smoya
Copy link
Member

smoya commented Sep 7, 2023

Reason/Context

At this moment, we run the following validation action that runs on each PR and validates GH Action workflow files by validating the schema against the following JSON Schema file.
That validation is very basic but still useful for catching very basic typos and errors.

However, yesterday I discovered https://github.com/rhysd/actionlint, a static linter for GitHub Actions workflow files.

The list of checks is massive, and I feel most of those are useful for our actions. For example, checking variables, syntax and type checking for ${{}} expressions, dispatch events usage validation, shellcheck integration for commands in run, dependencies validation, input checks for reusable workflows, besides others.

I believe we could switch completely the action we use now in favor of this one and improve validation of GH Actions workflow files. This will help developers to develop new workflow files or modify existing ones without the concern of pushing changes with wrong content.

Description

Test https://github.com/rhysd/actionlint against some repo first, and see if it catches issues. I expect the linter will catch some errors on existing workflow files.

If we find those, it will mean the action is completely needed so I would recommend to include it in our pipelines.
In the other hand, if doesn't find errors, to decide if we want to switch or rather keep the simple validation we have now.


For code owners, please consider this as a good-first-issue @derberg @alequetzalli @fmvilas @KhudaDad414

@smoya smoya added the enhancement New feature or request label Sep 7, 2023
@smoya smoya changed the title Evaluate usgin github.com/rhysd/actionlint for linting GH Actions workflow files Evaluate github.com/rhysd/actionlint for linting GH Actions workflow files Sep 7, 2023
@mhmohona
Copy link
Contributor

Hey @smoya, I would like to work on this.

@smoya
Copy link
Member Author

smoya commented Jan 14, 2024

Hey @smoya, I would like to work on this.

Of course! Feel free to submit your PR.

Thank you!

@Shurtu-gal
Copy link
Contributor

Should we continue the work in #268 and complete this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants