This simple GitHub Action allows to run various promtool
commands on Prometheus rules files.
name: Check Prometheus rules
on:
pull_request:
paths:
- 'monitoring/prometheus/*.y*ml'
jobs:
on-pull-request:
name: On Pull Request
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Check Prometheus rules
uses: beatlabs/[email protected]
with:
cmd: 'check'
files: 'monitoring/prometheus/*.y*ml'
- name: Test Prometheus rules
uses: beatlabs/[email protected]
with:
cmd: 'test'
files: 'monitoring/prometheus/test*.y*ml'