diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..a0ea122 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,33 @@ +name: "yamllint" + +on: + push: + branches: + - "main" + pull_request: + branches: + - "main" + types: [ "opened", "synchronize" ] + +jobs: + yamllint: + runs-on: "ubuntu-latest" + steps: + - name: "checkout" + uses: "actions/checkout@v4" + - name: "review github actions for development yaml format" + uses: "reviewdog/action-yamllint@v1" + with: + github_token: "${{ secrets.GITHUB_TOKEN }}" + reporter: "github-pr-review" + level: "warning" + yamllint_flags: "-c .yamllint ./.github/workflows/" + fail_on_error: true + - name: "review github actions yaml format" + uses: "reviewdog/action-yamllint@v1" + with: + github_token: "${{ secrets.GITHUB_TOKEN }}" + reporter: "github-pr-review" + level: "warning" + yamllint_flags: "-c .yamllint ./action.yml" + fail_on_error: true diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..a8a580b --- /dev/null +++ b/.yamllint @@ -0,0 +1,40 @@ +yaml-files: + - '*.yaml' + - '*.yml' + +rules: + braces: + level: warning + min-spaces-inside: 1 + max-spaces-inside: 1 + brackets: + level: warning + min-spaces-inside: 1 + max-spaces-inside: 1 + colons: + level: warning + commas: + level: warning + comments: + level: warning + min-spaces-from-content: 1 + comments-indentation: disable + document-end: disable + document-start: disable + empty-lines: disable + empty-values: disable + hyphens: disable + indentation: + level: warning + indent-sequences: consistent + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: + level: warning + new-lines: enable + octal-values: disable + quoted-strings: + quote-type: double + trailing-spaces: disable + truthy: disable