fix pr payload quoting in workflows
This commit is contained in:
@@ -113,19 +113,13 @@ jobs:
|
||||
created="false"
|
||||
for head in "${branch}" "thomas:${branch}"; do
|
||||
echo "Trying head=${head}"
|
||||
payload=$(printf '{"title":"update handy to %s","head":"%s","base":"main","body":"automated update of handy appimage version and hash"}' \
|
||||
"${{ steps.update.outputs.version }}" "$head")
|
||||
response=$(curl -sS -w '\n%{http_code}' -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${api}/pulls" \
|
||||
-d "$(cat <<JSON
|
||||
{
|
||||
"title": "update handy to ${{ steps.update.outputs.version }}",
|
||||
"head": "${head}",
|
||||
"base": "main",
|
||||
"body": "automated update of handy appimage version and hash"
|
||||
}
|
||||
JSON
|
||||
)")
|
||||
-d "$payload")
|
||||
|
||||
body=$(printf '%s\n' "$response" | sed '$d')
|
||||
code=$(printf '%s\n' "$response" | tail -n1)
|
||||
|
||||
@@ -114,19 +114,13 @@ jobs:
|
||||
created="false"
|
||||
for head in "${branch}" "thomas:${branch}"; do
|
||||
echo "Trying head=${head}"
|
||||
payload=$(printf '{"title":"update helium to %s","head":"%s","base":"main","body":"automated update of helium appimage version and hash"}' \
|
||||
"${{ steps.update.outputs.version }}" "$head")
|
||||
response=$(curl -sS -w '\n%{http_code}' -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${api}/pulls" \
|
||||
-d "$(cat <<JSON
|
||||
{
|
||||
"title": "update helium to ${{ steps.update.outputs.version }}",
|
||||
"head": "${head}",
|
||||
"base": "main",
|
||||
"body": "automated update of helium appimage version and hash"
|
||||
}
|
||||
JSON
|
||||
)")
|
||||
-d "$payload")
|
||||
|
||||
body=$(printf '%s\n' "$response" | sed '$d')
|
||||
code=$(printf '%s\n' "$response" | tail -n1)
|
||||
|
||||
@@ -112,19 +112,13 @@ jobs:
|
||||
created="false"
|
||||
for head in "${branch}" "thomas:${branch}"; do
|
||||
echo "Trying head=${head}"
|
||||
payload=$(printf '{"title":"update zen browser to %s","head":"%s","base":"main","body":"automated update of zen browser appimage version and hash"}' \
|
||||
"${{ steps.update.outputs.version }}" "$head")
|
||||
response=$(curl -sS -w '\n%{http_code}' -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${api}/pulls" \
|
||||
-d "$(cat <<JSON
|
||||
{
|
||||
"title": "update zen browser to ${{ steps.update.outputs.version }}",
|
||||
"head": "${head}",
|
||||
"base": "main",
|
||||
"body": "automated update of zen browser appimage version and hash"
|
||||
}
|
||||
JSON
|
||||
)")
|
||||
-d "$payload")
|
||||
|
||||
body=$(printf '%s\n' "$response" | sed '$d')
|
||||
code=$(printf '%s\n' "$response" | tail -n1)
|
||||
|
||||
Reference in New Issue
Block a user