Skip to content

Commit 4553799

Browse files
authored
Add yamllint.yml GitHub workflow (#17)
1 parent eedd591 commit 4553799

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/yamllint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# DO NOT EDIT: BEGIN
2+
# This snippet has been inserted automatically by mobsuccessbot, do not edit!
3+
# If changes are needed, update the action yamllint in
4+
# https://github.com/mobsuccess-devops/github-mobsuccess-policy
5+
name: Validate-YAML
6+
7+
on:
8+
merge_group:
9+
types:
10+
- checks_requested
11+
push:
12+
branches: [master, preprod, prod]
13+
pull_request:
14+
types: [opened, synchronize, reopened]
15+
16+
jobs:
17+
validate-yaml:
18+
name: Validate YAML files
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Validate YAML files
23+
run: |
24+
if [ -f .yamllint.yml ]; then
25+
yamllint -c .yamllint.yml .
26+
elif [ -f .gitignore ]; then
27+
yamllint -d "{extends: relaxed, ignore-from-file: [.gitignore], rules: {line-length: disable}}" .
28+
else
29+
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" .
30+
fi
31+
32+
# DO NOT EDIT: END

0 commit comments

Comments
 (0)