From cd4128df479219252740677f6431aa644750b2a5 Mon Sep 17 00:00:00 2001 From: Tolki Date: Thu, 28 Jul 2022 20:16:48 +0900 Subject: [PATCH] =?UTF-8?q?Moving=20from=20super=20to=20megalinter=20?= =?UTF-8?q?=F0=9F=A7=B9=20(#414)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Moving from super to megalinter 🧹 * Removing file selection regex --- .github/workflows/lint.yaml | 48 +++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 57cff19b..bf9501d2 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -7,27 +7,55 @@ on: # yamllint disable-line rule:truthy branches: - main +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + env: # Currently no way to detect automatically DEFAULT_BRANCH: main jobs: build: - name: Lint + name: MegaLinter runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Lint - uses: github/super-linter/slim@v4 + + - name: MegaLinter + uses: oxsecurity/megalinter@v6.1.0 env: - VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }} - DEFAULT_BRANCH: "${{ env.DEFAULT_BRANCH }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - ANSIBLE_CONFIG_FILE: .ansible-lint - MARKDOWN_CONFIG_FILE: .markdownlint.yaml - TERRAFORM_TFLINT_CONFIG_FILE: .tflint.hcl - YAML_CONFIG_FILE: .yamllint.yaml - KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas + VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }} + ENABLE_LINTERS: |- + ${{ + join( + fromJSON(' + [ + "ACTION_ACTIONLINT", + "ANSIBLE_ANSIBLE_LINT", + "COPYPASTE_JSCPD", + "KUBERNETES_KUBEVAL", + "MARKDOWN_MARKDOWNLINT", + "REPOSITORY_GIT_DIFF", + "REPOSITORY_SECRETLINT", + "TERRAFORM_TERRAFORM_FMT", + "YAML_PRETTIER", + "YAML_YAMLLINT" + ] + '), + ',' + ) + }} + ANSIBLE_DIRECTORY: provision/ansible + ANSIBLE_ANSIBLE_LINT_CONFIG_FILE: .github/linters/.ansible-lint + KUBERNETES_DIRECTORY: cluster + KUBERNETES_KUBEVAL_ARGUMENTS: --ignore-missing-schemas + MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .github/linters/.markdownlint.yaml + MARKDOWN_MARKDOWNLINT_RULES_PATH: .github/ + YAML_YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yaml + YAML_PRETTIER_CONFIG_FILE: .github/linters/.prettierrc.yaml + YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "(.*\\.sops\\.ya?ml)"