Skip to content

Commit 3ca6149

Browse files
committed
Attempt at fixing new lines in body:
1 parent 12bf626 commit 3ca6149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ fi
111111
# Creating the object in a PATCH-friendly way
112112
status_code="$(jq -nc \
113113
--arg tag_name "$tag" \
114+
--argjson draft "$(toJsonOrNull "$draft")" \
114115
--argjson target_commitish "$(toJsonOrNull "$INPUT_COMMITISH")" \
115116
--argjson name "$(toJsonOrNull "$INPUT_NAME")" \
116-
--argjson body "$(toJsonOrNull "$INPUT_BODY")" \
117-
--argjson draft "$(toJsonOrNull "$draft")" \
118117
--argjson prerelease "$(toJsonOrNull "$INPUT_PRERELEASE")" \
118+
--argjson body "$(toJsonOrNull "$(echo "$INPUT_BODY" | sed -z 's/\n/\\n/g')")" \
119119
'{$tag_name, $target_commitish, $name, $body, $draft, $prerelease} | del(.[] | nulls)' | \
120120
curl -s -X "$method" -d @- \
121121
--write-out "%{http_code}" -o "/tmp/$method.json" \

0 commit comments

Comments
 (0)