fix pr payload quoting in workflows

This commit is contained in:
2026-03-09 17:37:04 +00:00
parent 0f5f6f3694
commit 84585ae218
3 changed files with 9 additions and 27 deletions
+3 -9
View File
@@ -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)
+3 -9
View File
@@ -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)
+3 -9
View File
@@ -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)