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