shogo82148 / actions-cfn-lint

GitHub Action of https://github.com/aws-cloudformation/cfn-python-lint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Action for CloudFormation Linter with reviewdog

build Docker Image

This GitHub Action validates CloudFormation yaml/json templates using CloudFormation Linter. It is similar to cfn-lint-action, but with reviewdog on pull requests to improve code review experience.

github-pr-check sample

Inputs

github_token

Required reviewdog requires a GitHub token. The default value is '${{ secrets.github_token }}'.

tool_name

Optional. Tool name to use for reviewdog reporter. Useful when running multiple actions with different config.

level

Optional. Report level for reviewdog [info, warning, error]. It's same as -level flag of reviewdog.

reporter

Reporter of reviewdog command [github-pr-check, github-pr-review]. The default value is github-pr-check.

filter_mode

Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.

fail_on_error

Optional. Exit code for reviewdog when errors are found [true,false]. Default is false.

reviewdog_flags

Optional. Additional reviewdog flags. The default is "".

cfn_lint_args

Optional. the arguments for cfn-lint. The default is "".

working_directory

Optional. Directory to run the action on, from the repo root. The default is . ( root of the repository).

Outputs

There is no output.

Example usage

- name: minimum example
  uses: shogo82148/actions-cfn-lint@v1
  cfn_lint_args: "**/*.yaml **/*.yml **/*.json"

See .github/workflows/build.yml for more examples.

Migrate to v1 from v2

  • args input is removed. use cfn_lint_args instead of it.
  • the default of cfn_lint_args is now "". To have the same behavior as v1, please specify "**/*.yaml **/*.yml **/*.json".

About

GitHub Action of https://github.com/aws-cloudformation/cfn-python-lint/

License:MIT License


Languages

Language:Shell 84.0%Language:Dockerfile 10.1%Language:Makefile 5.9%