From 81537f2b9e187f576b85fd0110d8c8345398c68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Mon, 11 Mar 2024 17:21:21 +0100 Subject: [PATCH] Don't require to shell-escape conf_overrides Use heredoc syntax to append the value of `conf_overrides` to the `local.conf` file. Compared to the previous solution using `echo`, this removes the need to shell escape your value. Also remove the useless test, since the default value for `inputs.conf_overrides` is an empty string which results in a noop. Fixes #19. --- action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 7ca7b8a..6a237fa 100644 --- a/action.yaml +++ b/action.yaml @@ -81,9 +81,9 @@ runs: echo "ENABLED_SERVICES+=${ENABLED_SERVICES}" >> local.conf # This must stay at the end to allow any overrides - if [[ "${{ inputs.conf_overrides }}" != "" ]]; then - echo "${{ inputs.conf_overrides }}" >> local.conf - fi + cat << EOF_CONF_OVERRIDES >> local.conf + ${{ inputs.conf_overrides }} + EOF_CONF_OVERRIDES working-directory: ./devstack shell: bash - name: Run devstack