-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (73 loc) · 2.14 KB
/
checkers.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "Check modified files"
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
# If workflow is currently running, stop it and start a new one.
group: check-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
#---------------------------------------------------------------------
# 1-markdownlint
#---------------------------------------------------------------------
markdownlint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get list of changed files
id: changed
uses: tj-actions/changed-files@v45
with:
files: |
**.md
- name: Lint markdown files
if: steps.changed.outputs.any_changed == 'true'
uses: nosborn/[email protected]
with:
files: ${{ steps.changed.outputs.all_changed_files }}
config_file: .markdownlint.json
#---------------------------------------------------------------------
# 2-bandit_check
#---------------------------------------------------------------------
bandit_check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Check Python files
uses: tj-actions/[email protected]
with:
targets: |
**/**.py
options: "-v"
#---------------------------------------------------------------------
# 3-shellcheck
#---------------------------------------------------------------------
shellcheck:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get list of changed files
id: changed
uses: tj-actions/changed-files@v45
with:
files: |
**.sh
- name: Check for bash errors
if: steps.changed.outputs.any_changed == 'true'
run: |
shellcheck ${{ steps.changed.outputs.all_changed_files }}