Skip to content

Commit cb876ea

Browse files
committed
promtool linter
1 parent 6b1796b commit cb876ea

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
with:
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

Comments
 (0)