Created
September 5, 2020 23:33
-
-
Save yaleman/b74cc60215edca1b5153211a409970cf to your computer and use it in GitHub Desktop.
Basic splunk config checking in github actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the action will run. Runs on any PR or push, just to be sure. | |
on: [push, pull_request] | |
jobs: | |
test: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Runs a single command using the runners shell | |
- name: Install ksconf | |
run: python3 -m pip install kintyre-splunk-conf | |
- name: check all inputs.conf | |
run: find . -type f -name inputs.conf | ksconf check - || exit 1 | |
- name: check all other config files | |
run: find . -type f -name '*.conf' -not -name inputs.conf | ksconf check - || exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment