forked from falcosecurity/libs
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.85 KB
/
driver-schema-version.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
# NOTE: it is UNSAFE to run ANY kind of script when using the pull_request_target trigger!
# DO NOT TOUCH THIS FILE UNLESS THE TRIGGER IS CHANGED.
# See warning in https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
name: Driver SCHEMA_VERSION checks
on:
pull_request_target:
paths:
- 'driver/event_table.c'
- 'driver/ppm_events_public.h'
- 'driver/event_stats.h'
- 'driver/syscall_*'
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
driver_schema_changed: ${{ steps.filter.outputs.driver_schema }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: filter
with:
filters: |
driver_schema:
- 'driver/SCHEMA_VERSION'
driver-schema:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
needs: paths-filter
if: needs.paths-filter.outputs.driver_schema_changed == 'false'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Check driver SCHEMA_VERSION
uses: mshick/add-pr-comment@7c0890544fb33b0bdd2e59467fbacb62e028a096 # v2.8.1
with:
message: |
Please double check **driver/SCHEMA_VERSION** file. See [versioning](https://github.com/falcosecurity/libs/blob/master/driver/README.VERSION.md#schema-version-number).
/hold
- name: Trigger failure
run: |
echo Driver schema version likely needs to be bumped
cat ./driver/SCHEMA_VERSION
echo
echo Please double check **driver/SCHEMA_VERSION** file.
echo See: https://github.com/falcosecurity/libs/blob/master/driver/README.VERSION.md#schema-version-number.
exit 1