Linting Yaml files using the yamllint package directly from pypi.
Example of .github/workflows/yamllint-check.yml
---
name: Yamllint check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
name: Yamllint
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Run yamllint
uses: ansible-actions/[email protected]
with:
target: "./"
This will run the command yamllint ./
name | required | description | example values |
---|---|---|---|
target |
true | Target for yamllint | ./ or *.yml or path/to/yamlfiles |