Skip to content

Commit c4b4fec

Browse files
committed
promtool-github-action: Drop promtool_ prefix from inputs
Drop the prometool_prefix from the action's inputs.
1 parent 89ac9a9 commit c4b4fec

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
- name: Check Prometheus rules
2626
uses: beatlabs/promtool-github-action@v0.0.1
2727
with:
28-
promtool_command: 'check'
29-
promtool_files: 'monitoring/prometheus/*.y*ml'
28+
cmd: 'check'
29+
files: 'monitoring/prometheus/*.y*ml'
3030
3131
- name: Test Prometheus rules
3232
uses: beatlabs/promtool-github-action@v0.0.1
3333
with:
34-
promtool_command: 'test'
35-
promtool_files: 'monitoring/prometheus/test*.y*ml'
34+
cmd: 'test'
35+
files: 'monitoring/prometheus/test*.y*ml'
3636
```

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: 'Promtool GitHub Actions'
33
description: 'Run promtool commands against Prometheus rules files'
44
author: 'Markos Chandras'
55
inputs:
6-
promtool_command:
6+
cmd:
77
description: 'The promtool command to run'
88
required: true
99
default: false
10-
promtool_files:
10+
files:
1111
description: 'Files regex for prometheus rules files'
1212
required: true
1313
default: false

promtool-github-action

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
set -e
44

5-
if test ! -n "${INPUT_PROMTOOL_FILES}"; then
6-
echo "No 'promtool_files' input was specified"
5+
if test ! -n "${INPUT_FILES}"; then
6+
echo "No 'files' input was specified"
77
exit 1
88
fi
99

10-
if test ! -n "${INPUT_PROMTOOL_COMMAND}"; then
11-
echo "No 'promtool_command' input was specified"
10+
if test ! -n "${INPUT_CMD}"; then
11+
echo "No 'cmd' input was specified"
1212
exit 1
1313
fi
1414

15-
PROMTOOL_ACTION_FILES=${INPUT_PROMTOOL_FILES}
16-
PROMTOOL_ACTION_COMMAND=${INPUT_PROMTOOL_COMMAND}
15+
PROMTOOL_ACTION_FILES=${INPUT_FILES}
16+
PROMTOOL_ACTION_COMMAND=${INPUT_CMD}
1717

1818
main() {
1919
eval promtool "${PROMTOOL_ACTION_COMMAND}" rules "${GITHUB_WORKSPACE}/${PROMTOOL_ACTION_FILES}"

0 commit comments

Comments
 (0)