From 8709f35e76c9e0cf59154c2ca2283294540a23e5 Mon Sep 17 00:00:00 2001 From: Socheat Sok <4363857+socheatsok78@users.noreply.github.com> Date: Thu, 2 May 2024 14:54:26 +0700 Subject: [PATCH] Update jq commands --- action.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.sh b/action.sh index 93ebe18..1a3e2d0 100755 --- a/action.sh +++ b/action.sh @@ -42,11 +42,11 @@ gh api --paginate \ > "$GITHUB_RELEASE_MATRIX_ACTION_RAW_RELEASE_FILE" cat "$GITHUB_RELEASE_MATRIX_ACTION_RAW_RELEASE_FILE" | - jq --raw-output "if \"$INPUT_RELEASE\" == \"*\" then map(select(.draft == false and .prerelease == $INPUT_PRERELEASE)) else . end" | - jq --raw-output "$X_JQ_RELEASE_QUERY" | - jq --raw-output "if ($INPUT_PREFIX) then .tag_name |= ltrimstr(\"v\") else . end" | - jq --raw-output --slurp "." | - jq --raw-output "if $INPUT_LIMIT < 0 then . else .[:$INPUT_LIMIT] end" | + jq "if \"$INPUT_RELEASE\" == \"*\" then map(select(.draft == false and .prerelease == $INPUT_PRERELEASE)) else . end" | + jq "$X_JQ_RELEASE_QUERY" | + jq "if ($INPUT_PREFIX) then .tag_name |= ltrimstr(\"v\") else . end" | + jq --slurp "." | + jq "if $INPUT_LIMIT < 0 then . else .[:$INPUT_LIMIT] end" | jq --raw-output "tostring" \ > "$GITHUB_RELEASE_MATRIX_ACTION_RELEASE_FILE"