diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 000000000..745363888 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,6 @@ +--- +default: true + +# Line length +# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013 +MD013: false diff --git a/.github/linters/.yamllint.yml b/.github/linters/.yamllint.yml new file mode 100644 index 000000000..75da2b702 --- /dev/null +++ b/.github/linters/.yamllint.yml @@ -0,0 +1,5 @@ +--- +extends: default + +rules: + line-length: disable diff --git a/.github/workflows/bump-formula.yml b/.github/workflows/bump-formula.yml index 13d4ae3bf..11cee2363 100644 --- a/.github/workflows/bump-formula.yml +++ b/.github/workflows/bump-formula.yml @@ -1,4 +1,7 @@ +--- name: bump-formula + +# yamllint disable-line rule:truthy on: push: tags: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdb4f331b..05c68c20d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,7 @@ +--- name: CI +# yamllint disable-line rule:truthy on: pull_request: branches: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 879c9406f..fff2153e0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,4 @@ +--- # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -12,6 +13,7 @@ name: "CodeQL" +# yamllint disable-line rule:truthy on: push: branches: [ master ] diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..7e62adecc --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,65 @@ +--- +name: 'lint' + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + hadolint: + name: hadolint + runs-on: ubuntu-20.04 + steps: + - name: Clone + uses: actions/checkout@v2 + - name: Run hadolint + uses: brpaz/hadolint-action@eb9b96be611b84830aa1babacfb7070ecd2a8b1b + # v1.1.0 => eb9b96be611b84830aa1babacfb7070ecd2a8b1b + + markdown-lint: + name: markdown-lint + runs-on: ubuntu-20.04 + steps: + - name: Clone + uses: actions/checkout@v2 + - name: Run markdown-lint + uses: avto-dev/markdown-lint@6e6d4393411fbaae3c3aeee5661ba84a0352ed3b + # v1.4.0 => 6e6d4393411fbaae3c3aeee5661ba84a0352ed3b + with: + config: '.github/linters/.markdown-lint.yml' + args: './README.md' + + shellcheck: + name: shellcheck + runs-on: ubuntu-20.04 + steps: + - name: Clone + uses: actions/checkout@v2 + - name: Run shellcheck + uses: ludeeus/action-shellcheck@d586102c117f97e63d7e3b56629d269efc9a7c60 + # 1.0.0 => d586102c117f97e63d7e3b56629d269efc9a7c60 + + shfmt: + name: shfmt + runs-on: ubuntu-20.04 + steps: + - name: Clone + uses: actions/checkout@v2 + - name: Run shfmt + uses: luizm/action-sh-checker@802b81f66b6c31ea423aa41ad4f49f4b7b869272 + # v0.1.8 => 802b81f66b6c31ea423aa41ad4f49f4b7b869272 + env: + SHFMT_OPTS: -l -bn -ci -i 2 -d + with: + sh_checker_shellcheck_disable: true + + yamllint: + name: yamllint + runs-on: ubuntu-20.04 + steps: + - name: Clone + uses: actions/checkout@v2 + - name: Run yamllint + uses: ibiqlik/action-yamllint@b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee + # v3.0.0 => b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee + with: + config_file: '.github/linters/.yamllint.yml'