Skip to content
check-circle

GitHub Action

Yamllint Action

v0.0.2 Latest version

Yamllint Action

check-circle

Yamllint Action

Action to run Yamllint

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Yamllint Action

uses: ansible-actions/[email protected]

Learn more about this action in ansible-actions/yamllint-action

Choose a version

Action Yamllint

Linting Yaml files using the yamllint package directly from pypi.

Usage

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 ./

Variables

name required description example values
target true Target for yamllint ./ or *.yml or path/to/yamlfiles