Skip to content

Reference test scripts in README #26

Reference test scripts in README

Reference test scripts in README #26

name: Validate configuration syntax
on: [push, workflow_dispatch]
jobs:
test-syntax:
runs-on: ubuntu-latest
strategy:
matrix:
logstash-version: ['8.14.1', '7.17.22']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate configuration syntax
env:
LOGSTASH_VERSION: ${{matrix.logstash-version}}
run: |
docker run --rm \
--volume ./postfix.grok:/etc/logstash/patterns.d/postfix.grok \
--volume ./50-filter-postfix.conf:/usr/share/logstash/pipeline/50-filter-postfix.conf \
logstash:${LOGSTASH_VERSION} \
logstash --config.test_and_exit -f /usr/share/logstash/pipeline/50-filter-postfix.conf