GitHub Action
YAML file linter
0.1.0
Latest version
This action will lint YAML files in your project.
Describe how to use your action here.
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
Input | Description |
---|---|
path |
Path to the YAML file to be linted. |
strict (optional) |
Run the linter in strict mode (error on warnings). |
Output | Description |
---|---|
warnings |
The number of warnings raised if successful. |
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
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."