ci(pr): pipe PR payload to curl instead of writing /tmp/pr.json (#11)
CD — Deployment / deploy (push) Failing after 0s

PR automatique de fix/folder-traversal-user-rehome vers main.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #11
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
This commit was merged in pull request #11.
This commit is contained in:
Gitea Actions
2026-10-19 11:26:21 +00:00
committed by Esiah
co-authored by Esiah
parent f9ff6ee02c
commit 599784eec7
6 changed files with 167 additions and 22 deletions
+6 -8
View File
@@ -7,7 +7,7 @@ on:
jobs:
create-pr:
runs-on: self-hosted
runs-on: [self-hosted, cohaise-cloud]
permissions:
contents: write
pull-requests: write
@@ -40,15 +40,13 @@ jobs:
exit 0
fi
python3 - "$BRANCH" "$title" "$body" <<'PY' > /tmp/pr.json
python3 - "$BRANCH" "$title" "$body" <<'PY' | curl -fsS -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @- \
"$API/repos/$REPO/pulls"
import json, sys
branch, title, body = sys.argv[1], sys.argv[2], sys.argv[3]
print(json.dumps({"base": "main", "head": branch, "title": title, "body": body}))
PY
curl -fsS -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
--data @/tmp/pr.json \
"$API/repos/$REPO/pulls"
echo "PR créée."