-
Notifications
You must be signed in to change notification settings - Fork 575
64 lines (57 loc) · 1.92 KB
/
code-review.yml
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
---
name: Code Review
##########################################
# Start the job on push for all branches #
##########################################
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- main
workflow_dispatch: {}
permissions:
contents: read
packages: read
statuses: write
###############
# Set the Job #
###############
jobs:
build:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Run tflint
# run: |
# CONFIG_FILE=$(realpath ./.github/linters/.tflint.hcl)
# tflint --init --config=$CONFIG_FILE
# tflint --config=$CONFIG_FILE
# tflint --chdir=./examples/400-multi-with-orchestration --config=$CONFIG_FILE
# tflint --chdir=./examples/400-multi-with-remote-state/connectivity --config=$CONFIG_FILE
# tflint --chdir=./examples/400-multi-with-remote-state/core --config=$CONFIG_FILE
# tflint --chdir=./examples/400-multi-with-remote-state/management --config=$CONFIG_FILE
- name: Lint Code Base
uses: github/super-linter@v6
env:
VALIDATE_ALL_CODEBASE: false
# Need to define main branch as default
# is set to master in super-linter
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The following linter types will be enabled:
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
VALIDATE_POWERSHELL: true
VALIDATE_TERRAFORM_TFLINT: true
VALIDATE_YAML: true
# Additional settings:
# If a shell script is not executable, the bash-exec
# linter will report an error when set to true
ERROR_ON_MISSING_EXEC_BIT: true