-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.65 KB
/
prbuild.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: Pull Request Build
on:
pull_request:
paths-ignore:
# The ignore only works only if changes to the main branch only include the following files.
# So if the commit only contain .md changes but the PR change contain more, the ignore fails
# https://github.com/actions/runner/issues/2324#issuecomment-1703345084
- '**.md'
- '**.svg'
- '**.drawio'
- '**.png'
- '**.erd.json'
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
permissions: read-all
# Actions Used (please keep this documented here as added)
# https://github.com/marketplace/actions/checkout
# https://github.com/marketplace/actions/trufflehog-oss
jobs:
pre-commit-lint-security:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Print toolchain versions
run: |
node -v
python3 -V
pip3 -V
make --version
# TODO see whether we can leverage https://github.com/pre-commit/action
- name: Install system-wide tools dependencies
run: |
pip3 install pre-commit detect-secrets ggshield
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/[email protected]
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
- name: Install dependencies
run: |
make install
- name: Lint and code formatting
run: |
make check