Skip to content

Commit

Permalink
Another take on sed…
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Mar 15, 2020
1 parent 59ad02e commit fb49d82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 /

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit fb49d82

Please sign in to comment.