Skip to content
A GitHub Action to lint YAML files
Python Dockerfile
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
tests
Dockerfile
LICENSE
README.md
action.yml
main.py

README.md

YAML linter Action

GitHub Marketplace Actions Status Actions Status

This action will lint YAML files in your project.

Usage

Describe how to use your action here.

Example workflow

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Run action
      uses: jacobtomlinson/gha-lint-yaml@master
      with:
        path: path/to/my/yaml/file.yaml

Inputs

Input Description
path Path to the YAML file to be linted.
strict (optional) Run the linter in strict mode (error on warnings).

Outputs

Output Description
warnings The number of warnings raised if successful.

Examples

Running in strict mode

Here is an example of a very strict linting job.

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Run action
      uses: jacobtomlinson/gha-lint-yaml@master
      with:
        path: path/to/my/yaml/file.yaml
        strict: true

Using outputs

Here is an example of using the warnings outputs.

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Run action
      id: yamllint
      uses: jacobtomlinson/gha-lint-yaml@master
      with:
        path: path/to/my/yaml/file.yaml

    - name: Check outputs
        run: |
          echo "There were ${{ steps.yamllint.outputs.warnings }} YAML linting warnings."
You can’t perform that action at this time.