diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..257d78f --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,39 @@ +name: Lint Code Base +on: + push: + branches: + - main + tags: + - v* + pull_request: + branches: + - main + +jobs: + lint: + name: Lint Code Base + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: MegaLinter + uses: oxsecurity/megalinter@v7 + env: + VALIDATE_ALL_CODEBASE: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ENABLE_LINTERS: YAML_PRETTIER,KUBERNETES_HELM,KUBERNETES_KUBESCAPE,KUBERNETES_KUBECONFORM,SPELL_PROSELINT,JSON_JSONLINT,MARKDOWN_MARKDOWNLINT + YAML_PRETTIER_FILTER_REGEX_EXCLUDE: .*(Chart\.yaml|templates/.*).* + - name: Archive MegaLinter reports + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + name: MegaLinter reports + path: | + megalinter-reports + mega-linter.log