generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (65 loc) · 2.19 KB
/
megalinter.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
62
63
64
65
66
67
68
69
70
---
name: PR - MEGALinter
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
branches:
- main
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Generate Token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TVORIES_APP_ID }}
private_key: ${{ secrets.TVORIES_APP_PRIVATE_KEY }}
- name: MegaLinter
uses: megalinter/megalinter/flavors/terraform@v8
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
PRINT_ALPACA: false
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
ENABLE_LINTERS: |-
${{
join(
fromJSON('
[
"ACTION_ACTIONLINT",
"ANSIBLE_ANSIBLE_LINT",
"CREDENTIALS_SECRETLINT",
"GIT_GIT_DIFF",
"KUBERNETES_KUBEVAL",
"MARKDOWN_MARKDOWNLINT",
"PYTHON_PYLINT",
"PYTHON_FLAKE8",
"TERRAFORM_TERRAFORM_FMT",
"YAML_PRETTIER",
"YAML_YAMLLINT"
]
'),
','
)
}}
KUBERNETES_DIRECTORY: k8s
KUBERNETES_KUBEVAL_ARGUMENTS: --ignore-missing-schemas
KUBERNETES_KUBEVAL_FILTER_REGEX_INCLUDE: "(k8s/clusters|k8s/global)"
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .github/linters/markdownlint.config.yaml
MARKDOWN_MARKDOWNLINT_RULES_PATH: .github/
PYTHON_FLAKE8_CONFIG_FILE: .github/linters/.flake8
YAML_YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yaml
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "(.*\\.sops\\.ya?ml)"
- name: Archive artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
report
mega-linter.log