Skip to content

feat: updated yamllint file #2

feat: updated yamllint file

feat: updated yamllint file #2

Workflow file for this run

---
name: PR yamllint
on:
workflow_call:
inputs:
changed_only:
required: false
default: false
type: boolean
description: Run YAMLlint against changed files only
push:
branches:
- '**'
pull_request:
types: [opened, synchronize]
jobs:
yamllint:
name: Lint YAML files
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Ensure yamllint settings
if: hashFiles('.yamllint') == ''
run: |
cat >.yamllint <<EOF
---
extends: default
rules:
# Disabled as only in a very few select use cases document marker is needed
# as explained here: https://yaml.org/spec/1.2.2/#912-document-markers
document-start: disable
indentation:
spaces: 2
indent-sequences: whatever
line-length:
max: 120
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
level: warning
truthy:
allowed-values: ['true', 'false']
check-keys: false
EOF
- name: Run yamllint
run: yamllint --config-file .yamllint --format github .