mirror of
https://github.com/ibiqlik/action-yamllint.git
synced 2024-11-23 18:19:33 +01:00
parent
c2e8eccd22
commit
c19bd0523a
4 changed files with 21 additions and 3 deletions
10
.github/workflows/lint.yml
vendored
10
.github/workflows/lint.yml
vendored
|
@ -18,7 +18,15 @@ jobs:
|
||||||
trailing-spaces:
|
trailing-spaces:
|
||||||
level: warning
|
level: warning
|
||||||
|
|
||||||
- name: lint all (but pass)
|
- name: lint all - no warnings (continue on error)
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
file_or_dir: test
|
||||||
|
strict: true
|
||||||
|
no_warnings: true
|
||||||
|
|
||||||
|
- name: lint all (continue on error)
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -19,8 +19,9 @@ Simple as:
|
||||||
- `file1.yaml`
|
- `file1.yaml`
|
||||||
- `file1.yaml file2.yaml`
|
- `file1.yaml file2.yaml`
|
||||||
- `kustomize/**/*.yaml mychart/*values.yaml`
|
- `kustomize/**/*.yaml mychart/*values.yaml`
|
||||||
- `format` - Format for parsing output [parsable,standard,colored,github,auto] (default: parsable)
|
- `format` - Format for parsing output `[parsable,standard,colored,github,auto] (default: parsable)`
|
||||||
- `strict` - Return non-zero exit code on warnings as well as errors [true,false] (default: false)
|
- `strict` - Return non-zero exit code on warnings as well as errors `[true,false] (default: false)`
|
||||||
|
- `no_warnings` - Output only error level problems `[true,false] (default: false)`
|
||||||
|
|
||||||
**Note:** If `.yamllint` configuration file exists in your root folder, yamllint will automatically use it.
|
**Note:** If `.yamllint` configuration file exists in your root folder, yamllint will automatically use it.
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ inputs:
|
||||||
description: 'Return non-zero exit code on warnings as well as errors'
|
description: 'Return non-zero exit code on warnings as well as errors'
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
no_warnings:
|
||||||
|
description: 'Output only error level problems'
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
|
@ -32,6 +36,7 @@ runs:
|
||||||
INPUT_CONFIG_DATA: ${{ inputs.config_data }}
|
INPUT_CONFIG_DATA: ${{ inputs.config_data }}
|
||||||
INPUT_FORMAT: ${{ inputs.format }}
|
INPUT_FORMAT: ${{ inputs.format }}
|
||||||
INPUT_STRICT: ${{ inputs.strict }}
|
INPUT_STRICT: ${{ inputs.strict }}
|
||||||
|
INPUT_NO_WARNINGS: ${{ inputs.no_warnings }}
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
color: blue
|
color: blue
|
||||||
|
|
|
@ -18,6 +18,10 @@ if [[ "$INPUT_STRICT" == "true" ]]; then
|
||||||
options+=(-s)
|
options+=(-s)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$INPUT_NO_WARNINGS" == "true" ]]; then
|
||||||
|
options+=(--no-warnings)
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable globstar so ** globs recursively
|
# Enable globstar so ** globs recursively
|
||||||
shopt -s globstar
|
shopt -s globstar
|
||||||
# Use the current directory by default
|
# Use the current directory by default
|
||||||
|
|
Loading…
Reference in a new issue