Skip to content

Commit

Permalink
create yamllint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
okuzawats committed Jul 1, 2024
1 parent b47aaac commit c236db7
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c236db7

Please sign in to comment.