Skip to content

Commit

Permalink
Add yaml linter github action
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed May 7, 2024
1 parent b68fe7e commit 3e7ebde
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# MegaLinter GitHub Action configuration file
# More info at https://oxsecurity.github.io/megalinter
name: mega-linter-yaml

on:
pull_request:

permissions:
contents: read

jobs:
build:
name: mega-linter-yaml
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 1

- name: yamllint
uses: oxsecurity/megalinter/flavors/ci_light@v7
31 changes: 31 additions & 0 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments: disable
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
hyphens: enable
indentation: disable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
check-keys: false

0 comments on commit 3e7ebde

Please sign in to comment.