Skip to content

Commit

Permalink
Add lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
Serubin committed Mar 22, 2024
1 parent f8c6c6a commit 7a38eb9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/lint/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ignore: |

Check failure on line 1 in .github/lint/.yamllint.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] reported by reviewdog 🐶 [warning] missing document start "---" (document-start) Raw Output: .github/lint/.yamllint.yaml:1:1: [warning] missing document start "---" (document-start)
*.sops.*
gotk-components.yaml
extends: default
rules:
truthy:
allowed-values: ["true", "false", "on"]
comments:
min-spaces-from-content: 1
line-length: disable
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation:
spaces: 2
indent-sequences: consistent
29 changes: 29 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Lint YAML files

on:
pull_request:
paths:
- "**.yaml"
- "**.yml"

jobs:
yamllint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changes
uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
filters: |
yaml:
- added|modified: "**.yaml"
- added|modified: "**.yml"
- name: Lint files
if: ${{ steps.filter.outputs.yaml == 'true' }}
uses: reviewdog/action-yamllint@v1
with:
yamllint_flags: "-c .github/lint/.yamllint.yaml ${{ steps.filter.outputs.yaml_files }}"

0 comments on commit 7a38eb9

Please sign in to comment.