Skip to content

Commit 2b49a75

Browse files
committed
Add yamllint.yml GitHub workflow
1 parent ee4e8c8 commit 2b49a75

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/yamllint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
push:
9+
branches: [master, preprod, prod]
10+
pull_request:
11+
types: [opened, synchronize, reopened]
12+
13+
jobs:
14+
validate-yaml:
15+
name: Validate YAML files
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Validate YAML files
20+
run: |
21+
if [ -f .yamllint.yml ]; then
22+
yamllint -c .yamllint.yml .
23+
elif [ -f .gitignore ]; then
24+
yamllint -d "{extends: relaxed, ignore-from-file: [.gitignore], rules: {line-length: disable}}" .
25+
else
26+
yamllint -d "{extends: relaxed, rules: {line-length: disable}}" .
27+
fi
28+
29+
# DO NOT EDIT: END

0 commit comments

Comments
 (0)