We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b1796b commit cb876eaCopy full SHA for cb876ea
.github/workflows/promtool-check-rules.yaml
@@ -0,0 +1,32 @@
1
+name: Prometheus Check Rules
2
+
3
+on:
4
+ pull_request:
5
+ paths:
6
+ - '**/*.rules'
7
+ - '**/*.alerts'
8
9
+jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ - name: Checkout PR
15
+ uses: actions/checkout@v4
16
17
+ - name: Get changed rule and alert files
18
+ id: changed
19
+ uses: tj-actions/changed-files@v44
20
+ with:
21
+ files: |
22
+ **/*.rules
23
+ **/*.alerts
24
25
+ - name: Check changed rule and alert files via promtool
26
+ if: steps.changed.outputs.any_changed == 'true'
27
+ uses: peimanja/[email protected]
28
29
+ promtool_actions_subcommand: 'rules'
30
+ promtool_actions_files: ${{ steps.changed.outputs.all_changed_files }}
31
+ promtool_actions_version: 'latest'
32
+ promtool_actions_comment: 'false'
0 commit comments