From 51f03c4b109cba3a90b9cbae62cd473d93b33e40 Mon Sep 17 00:00:00 2001 From: Mobsuccess Bot Date: Fri, 4 Oct 2024 07:42:27 +0000 Subject: [PATCH] chore(gha): add yamllint.yml GitHub workflow --- .github/workflows/yamllint.yml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 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 00000000..c503f166 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,44 @@ +# 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@v4 + - 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 + + notify: + needs: [validate-yaml] + if: failure() + runs-on: ubuntu-20.04 + steps: + - name: Notify + uses: mobsuccess-devops/github-actions-notify@master + with: + notify-type: "workflow-failure" + slack-token: ${{ secrets.SLACK_TOKEN_MSBOT }} + slack-channel: ${{ vars.SLACK_CHANNEL_NOTIFY_WORKFLOW_FAIL }} + platform-pat: ${{ secrets.MS_PLATFORM_LIST_USERS_PAT }} +# DO NOT EDIT: END