-
Notifications
You must be signed in to change notification settings - Fork 74
35 lines (31 loc) · 969 Bytes
/
yaml-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
name: YAML Linter
on:
push:
pull_request:
paths:
- "yml/**"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check file extensions
run: |
files=$(find "$GITHUB_WORKSPACE/yml" -type f -not -name "*.yml");
if [[ $files ]]; then
echo "::errror::Files with unexpected extension found, please ensure you use '.yml' (all lower case) for files in the yml/ folder.";
for i in $files; do echo "::error file=$i,line=1::Unexpected extension"; done
exit 1;
fi
unset files
- name: Run YAML linter
uses: ibiqlik/[email protected]
with:
config_file: .github/.yamllint
- uses: cketti/[email protected] #eliezio/[email protected]
name: Check schema
with:
files: "yml/**/*.*"
schema: .github/schema/schema.yml
strict: true