From 071fc32d14736a344c39c2178f1699b7f7757002 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 23 May 2024 17:00:58 -0700 Subject: [PATCH] oop --- .../setup-config-conf-for-ee/action.yml | 23 +++++++++++++++++++ .github/actions/setup-config-conf/action.yml | 18 +++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/actions/setup-config-conf-for-ee/action.yml create mode 100644 .github/actions/setup-config-conf/action.yml diff --git a/.github/actions/setup-config-conf-for-ee/action.yml b/.github/actions/setup-config-conf-for-ee/action.yml new file mode 100644 index 000000000..613f4dce3 --- /dev/null +++ b/.github/actions/setup-config-conf-for-ee/action.yml @@ -0,0 +1,23 @@ + - name: Install crudini to manipulate config.conf + run: pip3 install crudini -c requirements.txt + working-directory: .github/workflows + shell: bash + + - name: Don't use community edition in config.conf + run: crudini --existing=param --set config.conf community-edition hosts '' + shell: bash + + - name: Set host in config file + run: crudini --existing=param --set config.conf enterprise-edition hosts 127.0.0.1 + working-directory: test + shell: bash + + - name: Set user in config file + run: crudini --existing=param --set config.conf enterprise-edition user superuser + working-directory: test + shell: bash + + - name: Set password in config file + run: crudini --existing=param --set config.conf enterprise-edition password superuser + working-directory: test + shell: bash diff --git a/.github/actions/setup-config-conf/action.yml b/.github/actions/setup-config-conf/action.yml new file mode 100644 index 000000000..a5b7c1da8 --- /dev/null +++ b/.github/actions/setup-config-conf/action.yml @@ -0,0 +1,18 @@ +name: 'Setup config.conf' +description: 'Setup config.conf from config.conf.template' +inputs: + using-ee-server: + required: false + default: false + +runs: + using: "composite" + steps: + - name: Install config.conf to use community edition + run: cp config.conf.template config.conf + working-directory: test + shell: bash + + - name: If using EE server, modify config.conf accordingly + if: ${{ inputs.using-ee-server == 'true' }} + uses: ./.github/actions/setup-config-conf-for-ee