This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (59 loc) · 2.15 KB
/
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
62
63
64
65
66
67
68
69
70
71
72
73
74
# yamllint disable rule:comments
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Linter"
'on':
workflow_dispatch:
pull_request:
branches:
- master
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: actions/create-github-app-token@c8f55efbd427e7465d6da1106e7979bc8aaee856 # v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
token: "${{ steps.app-token.outputs.token }}"
- name: Setup OpenTofu
uses: opentofu/setup-opentofu@ae80d4ecaab946d8f5ff18397fbf6d0686c6d46a # v1.0.3
- name: Setup TFLint
uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Setup kubeconform and helm
shell: bash
run: brew install helm kubeconform yq
- name: Init TFLint
run: tflint --init
env:
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
- name: Run tofu formatter
run: tofu fmt -check -diff -recursive tofu/
- name: Run tofu lint
run: tflint -f compact
- name: Run yamllint
uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1
with:
yamllint_strict: true
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: "${{ steps.app-token.outputs.token }}"
- name: Run task lint:egress-comment
run: ./.taskfiles/Lint/egress-comment-job.sh
- name: Run task lint:kubeconform
run: ./.taskfiles/Lint/kubeconform-job.sh
- name: Run task lint:yaml-json-schema
run: ./.taskfiles/Lint/yaml-json-schema-job.sh
env:
IGNORE_SCHEMA_FETCH: "1"
# yamllint enable rule:comments