diff --git a/Dockerfile b/Dockerfile index 0a3a880..39a1ee2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.11 -RUN apk add --no-cache sed file curl jq +RUN apk add --no-cache file curl jq COPY entrypoint.sh / diff --git a/entrypoint.sh b/entrypoint.sh index 375c69a..851ac65 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -115,7 +115,7 @@ status_code="$(jq -nc \ --argjson target_commitish "$(toJsonOrNull "$INPUT_COMMITISH")" \ --argjson name "$(toJsonOrNull "$INPUT_NAME")" \ --argjson prerelease "$(toJsonOrNull "$INPUT_PRERELEASE")" \ - --argjson body "$(toJsonOrNull "$(echo "$INPUT_BODY" | sed -z 's/\n/\\n/g')")" \ + --argjson body "$(toJsonOrNull "$(echo "$INPUT_BODY" | sed ':a;N;$!ba;s/\n/\\n/g')")" \ '{$tag_name, $target_commitish, $name, $body, $draft, $prerelease} | del(.[] | nulls)' | \ curl -s -X "$method" -d @- \ --write-out "%{http_code}" -o "/tmp/$method.json" \