Skip to content

Commit 963e3f9

Browse files
committed
Add check for alerts
1 parent c559b82 commit 963e3f9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Check Alerts using Promtool
2+
on:
3+
pull_request:
4+
paths:
5+
- '**/*.rules.yaml'
6+
- '**/*.alerts.yaml'
7+
8+
jobs:
9+
lint:
10+
@@ -14,19 +20,42 @@ jobs:
11+
- name: Checkout PR
12+
uses: actions/checkout@v5
13+
14+
- name: Get changed rule and alert files
15+
id: changed
16+
uses: tj-actions/changed-files@v46
17+
- name: Install Helm
18+
uses: azure/setup-helm@v4
19+
with:
20+
files: |
21+
**/*.rules.yaml
22+
**/*.alerts.yaml
23+
- name: Check changed rule and alert files via promtool
24+
if: steps.changed.outputs.any_changed == 'true'
25+
uses: peimanja/[email protected]
26+
with:
27+
promtool_actions_subcommand: 'rules'
28+
promtool_actions_files: ${{ steps.changed.outputs.all_changed_files }}
29+
promtool_actions_version: 'latest'
30+
promtool_actions_comment: 'false'

0 commit comments

Comments
 (0)