From 4eabddc6f4a2b24ee5d30789b7758ca5aaefec9f Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 7 Mar 2024 12:15:30 -0500 Subject: [PATCH] Add support for a custom opensearch.yml file Signed-off-by: Derek Ho --- action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/action.yml b/action.yml index ee9d27a..c8b3da6 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,10 @@ inputs: description: 'Path to a security config file to replace the default. Leave empty if security is not enabled or using the default config' required: false + opensearch_yml_file: + description: 'Path to a opensearch.yml file to replace the default. Leave empty to use the default config' + required: false + runs: using: "composite" steps: @@ -122,6 +126,12 @@ runs: echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml shell: bash + - name: Replace opensearch.yml file if applicable + if: ${{ inputs.opensearch_yml_file != '' }} + run: | + mv ${{ inputs.opensearch_yml_file }} ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml + shell: bash + # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}}