Skip to content

Commit fb49d82

Browse files
committed
Another take on sed…
1 parent 59ad02e commit fb49d82

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.11
22

3-
RUN apk add --no-cache sed file curl jq
3+
RUN apk add --no-cache file curl jq
44

55
COPY entrypoint.sh /
66

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ status_code="$(jq -nc \
115115
--argjson target_commitish "$(toJsonOrNull "$INPUT_COMMITISH")" \
116116
--argjson name "$(toJsonOrNull "$INPUT_NAME")" \
117117
--argjson prerelease "$(toJsonOrNull "$INPUT_PRERELEASE")" \
118-
--argjson body "$(toJsonOrNull "$(echo "$INPUT_BODY" | sed -z 's/\n/\\n/g')")" \
118+
--argjson body "$(toJsonOrNull "$(echo "$INPUT_BODY" | sed ':a;N;$!ba;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)