From 4553799239bf056afa6a9d61f634dbd03c60dd2a Mon Sep 17 00:00:00 2001 From: mobsuccessbot <82460764+ms-bot@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:52:53 +0200 Subject: [PATCH] Add yamllint.yml GitHub workflow (#17) --- .github/workflows/yamllint.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..7d6b771 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,32 @@ +# 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: + merge_group: + types: + - checks_requested + 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], rules: {line-length: disable}}" . + else + yamllint -d "{extends: relaxed, rules: {line-length: disable}}" . + fi + +# DO NOT EDIT: END