Skip to content

Swap yaml-lint for mega-linter #2

Swap yaml-lint for mega-linter

Swap yaml-lint for mega-linter #2

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: MegaLinter
on:
workflow_dispatch:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# https://megalinter.io/latest/supported-linters/
# https://megalinter.io/7.11.1/flavors/terraform/
- name: MegaLinter
# Terraform image is much smaller than default image
uses: oxsecurity/megalinter/flavors/[email protected]
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_LINTERS: |-
${{
join(
fromJSON('
[
"BASH_SHELLCHECK",
"MARKDOWN_MARKDOWNLINT",
"REPOSITORY_GIT_DIFF",
"REPOSITORY_SECRETLINT",
"YAML_YAMLLINT",
"YAML_PRETTIER",
]
'),
','
)
}}
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .ci/markdownlint/markdownlint.config.yaml
MARKDOWN_MARKDOWNLINT_RULES_PATH: .ci/markdownlint/
YAML_YAMLLINT_CONFIG_FILE: .ci/yamllint/.yamllint.yaml
YAML_PRETTIER_CONFIG_FILE: .ci/prettier/.prettierrc.yaml
YAML_PRETTIER_ARGUMENTS: --ignore-path .ci/prettier/.prettierignore