ci-actions-yamllint
is an action for linting yaml files.
The image is available on the dockerhub as smoloney/ci-actions-yamllint.
action "yamllint" {
uses = "stephenmoloney/ci-actions-copyleft/yamllint@master",
args = [
"--exclude=./k8s/charts",
"--file-glob='*.y*ml'",
"--exec-args='yamllint --strict --config-file=./yamllint'"
]
}
docker run --rm -v "${PWD}":/ci-actions/workspace smoloney/ci-actions-yamllint:latest \
--exclude='./test/ci-yamllint/ignore-dir' \
--exclude='./test/ci-yamllint/ignore-fail.yaml' \
--file-glob='*.y*ml' \
--exec-args='yamllint --strict --config-file=.yamllint.yml'
docker run --rm -v "${PWD}":/ci-actions/workspace smoloney/ci-actions-yamllint:latest
--exec-args='yamllint --strict --config-file=.yamllint.yml'
Usage:
docker run \
--rm \
-v ${PWD}:${WORKSPACE} smoloney/ci-actions-yamllint:latest \
[--exec_args EXEC_ARGS] [--exclude EXCLUDE...] [--file-glob FILE_GLOB]
Options:
--exec_args Executable arguments to be passed to yammlint
--file_glob The type of file to be found based on file extension. '*.y*ml' is recommended.
--exclude (repeatable arg) directories to be ignored
To exclude particular paths whether files or folders, enter them as follows:
--exclude='./k8s/test-charts' --exclude='.yamllint.yml'
The command to executed is configurable. Run yamllint --help
for
options and/or documentation.
--exec-args='yamllint --strict --config-file=.yamllint.yml'