-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (40 loc) · 1.48 KB
/
lint_on_pr.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
---
name: Lint codebase
permissions:
actions: write # so 'cancel-workflow-action' can function
statuses: write # so 'super-linter' can write individual check statuses to the pr / commit
on:
pull_request:
branches:
- main
jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
with:
fetch-depth: 0
- name: Lint Code Base (Blocking) # Blow up on gitleaks / github actions errors (ie. things which may / will cause issues)
uses: github/super-linter@759885f47664595a56db33fee55d64a393e5bad8
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE_ERRORS: false
VALIDATE_GITLEAKS: true
VALIDATE_GITHUB_ACTIONS: true
- name: Lint Code Base (Information only) # Run linter on everything else, but in 'information-only' mode.
uses: github/super-linter@759885f47664595a56db33fee55d64a393e5bad8
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE_ERRORS: true
VALIDATE_GITLEAKS: false
VALIDATE_GITHUB_ACTIONS: false