Skip to content

Commit

Permalink
feat: v1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaironalves committed Jun 22, 2024
1 parent 59169bf commit c500ab9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ _replace_dots() {
_set_github_output() {
local propAndValue="$1"
prop="${propAndValue%%=*}"
value="${propAndValue#*=}"
echo "$value"
echo "${value//\\n/$'\n'}"
if echo $value | grep -iq "\\n"; then
value="${propAndValue#*=}"
if echo $value | grep -iq "#EOL#"; then
{
echo "$prop<<EOF"
echo "${value//\\n//$'\n'}"
echo "${value//#EOL#/$'\n'}"
echo EOF
} >> "$GITHUB_OUTPUT"
else
Expand All @@ -33,13 +31,14 @@ set -e

_properties=$(_yaml_to_properties "$INPUT_YAML_FILE_PATH")
_parsed_properties=$(_replace_dots "$_properties" "_")
_escaped_multiline_properties=$(echo "${_parsed_properties//\\n/#EOL#}")

#echo "$_properties"
echo "$_parsed_properties"
echo ""
echo "${_parsed_properties//\\n/#EOL#}"

echo "$_parsed_properties" | while read -r propAndValue;
echo "$_escaped_multiline_properties" | while read -r propAndValue;
do
#echo "$propAndValue" >>"$GITHUB_OUTPUT"
_set_github_output "$propAndValue"
Expand Down

0 comments on commit c500ab9

Please sign in to comment.