Skip to content

Commit 98cf504

Browse files
authored
Lint MarkDown and Terraform code (#3)
* Lint MarkDown and Terraform code * Only run linting on PRs * Ensure linting passes before being able to merge a PR * Lint everything that super-linter can lint
1 parent 2d0543e commit 98cf504

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/linter.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Lint Code Base
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v2
15+
with:
16+
# Full git history is needed to get a proper list of changed files within `super-linter`
17+
fetch-depth: 0
18+
- name: Lint Code Base
19+
uses: github/super-linter@v3
20+
env:
21+
DEFAULT_BRANCH: main
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

github.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ resource "github_branch_protection" "main" {
3939
require_signed_commits = true
4040

4141
required_status_checks {
42-
strict = true
42+
strict = true
43+
contexts = ["Lint"]
4344
}
4445

4546
required_pull_request_reviews {

0 commit comments

Comments
 (0)