From fe9f9de7bb195c9b12be261b254197f70349cd16 Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Fri, 5 Jul 2024 00:17:16 +0200 Subject: [PATCH 1/2] Allow manual triggering of a workflow Maybe this will alow me to run a workflow on a contributer PR? --- .github/workflows/test_config_syntax.yml | 2 +- .github/workflows/test_grok_patterns.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_config_syntax.yml b/.github/workflows/test_config_syntax.yml index 76d8461..f5e8621 100644 --- a/.github/workflows/test_config_syntax.yml +++ b/.github/workflows/test_config_syntax.yml @@ -1,5 +1,5 @@ name: Validate configuration syntax -on: [push] +on: [push, workflow_dispatch] jobs: test-syntax: runs-on: ubuntu-latest diff --git a/.github/workflows/test_grok_patterns.yml b/.github/workflows/test_grok_patterns.yml index 9df748c..160f8ec 100644 --- a/.github/workflows/test_grok_patterns.yml +++ b/.github/workflows/test_grok_patterns.yml @@ -1,5 +1,5 @@ name: Test grok patterns -on: [push] +on: [push, workflow_dispatch] jobs: test-patterns: runs-on: ubuntu-latest From c13b5da928217c0961e884dfb87c9e7a1d37740e Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Fri, 5 Jul 2024 00:19:36 +0200 Subject: [PATCH 2/2] Test with supported logstash versions --- .github/workflows/test_config_syntax.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_config_syntax.yml b/.github/workflows/test_config_syntax.yml index f5e8621..38ad6f9 100644 --- a/.github/workflows/test_config_syntax.yml +++ b/.github/workflows/test_config_syntax.yml @@ -3,11 +3,18 @@ on: [push, workflow_dispatch] jobs: test-syntax: runs-on: ubuntu-latest + strategy: + matrix: + logstash-version: ['8.14.1', '7.17.22'] steps: - - uses: actions/checkout@v4 - - run: | + - 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:8.12.0 \ + logstash:${LOGSTASH_VERSION} \ logstash --config.test_and_exit -f /usr/share/logstash/pipeline/50-filter-postfix.conf