-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (54 loc) · 1.75 KB
/
mega-linter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
# 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