-
Notifications
You must be signed in to change notification settings - Fork 45
61 lines (51 loc) · 1.53 KB
/
linter-analysis.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
name: Linter Analysis
on:
push:
branches: ['*'] # '*' will cause the workflow to run on all commits to all branches.
jobs:
# Hadolint: Job-1
Hadolint:
name: Hadolint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Hadolint Action
uses: jbergstroem/[email protected]
with:
dockerfile: ./Dockerfile
config_file: linting-configs/.hadolint.yaml
error_level: 1 # Fail CI based on hadolint output (-1: never, 0: error, 1: warning, 2: info)
# ShellCheck: Job-2
ShellCheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run ShellCheck Action
uses: ludeeus/action-shellcheck@master
with:
severity: error
ignore_names: additional_userdata.sh
# TFLint: Job-3
TFLint:
name: TFLint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Plugin Directory
uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: ubuntu-latest-tflint-${{ hashFiles('.tflint.hcl') }}
- name: Setup TFLint
uses: terraform-linters/[email protected]
with:
tflint_version: latest
github_token: ${{ secrets.LINTER_TEST_TOKEN }}
- name: Initializing TFLint
run: TFLINT_LOG=info tflint --init -c .tflint.hcl
- name: Run TFLint Action
run: TFLINT_LOG=info tflint -c .tflint.hcl