diff --git a/action.yml b/action.yml index be9503d..7faedbc 100644 --- a/action.yml +++ b/action.yml @@ -125,8 +125,9 @@ runs: chmod ugoa+rw -R '${{ github.workspace }}' '${{ github.action_path }}' # Write out customizations via env vars to avoid heredoc injection - printf '%s' "$INPUT_CSS" > '${{ github.action_path }}/custom.css' - printf '%s' "$INPUT_CUSTOMIZATIONS" > '${{ github.action_path }}/custom.yaml' + # Only create files when inputs are non-empty; empty files cause addStyleTag/readYamlFile to fail + [ -n "$INPUT_CSS" ] && printf '%s' "$INPUT_CSS" > '${{ github.action_path }}/custom.css' || true + [ -n "$INPUT_CUSTOMIZATIONS" ] && printf '%s' "$INPUT_CUSTOMIZATIONS" > '${{ github.action_path }}/custom.yaml' || true # Prepare inputs that should be passed to the docker container. cat <<'__EOF__' >docker.env