Skip to content

Commit

Permalink
Add yamllint.yml GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-bot committed Feb 3, 2023
1 parent 2da236b commit 501bc4b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# DO NOT EDIT: BEGIN
# This snippet has been inserted automatically by mobsuccessbot, do not edit!
# If changes are needed, update the action yamllint in
# https://github.com/mobsuccess-devops/github-mobsuccess-policy
name: Validate-YAML

on:
push:
branches: [master, preprod, prod]
pull_request:
types: [opened, synchronize, reopened]

jobs:
validate-yaml:
name: Validate YAML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate YAML files
run: |
if [ -f .yamllint.yml ]; then
yamllint -c .yamllint.yml .
elif [ -f .gitignore ]; then
yamllint -d "{extends: relaxed, ignore-from-file: [.gitignore]}" .
else
yamllint -d relaxed .
fi
# DO NOT EDIT: END

0 comments on commit 501bc4b

Please sign in to comment.