fix: update manifest on master branch via Gitea API
Build and Release Plugin / release (push) Failing after 33s

This commit is contained in:
2026-09-17 21:17:44 +02:00
parent fea812d3a3
commit 0cfaa50805
+4 -4
View File
@@ -131,18 +131,18 @@ jobs:
B64_CONTENT=$(base64 -w0 manifest.json)
# Update on manifest branch
EXISTING_MANIFEST=$(curl -s -H "Authorization: token $TOKEN" "$API_URL/repos/$REPO/contents/manifest.json?ref=manifest")
# Update on master branch
EXISTING_MANIFEST=$(curl -s -H "Authorization: token $TOKEN" "$API_URL/repos/$REPO/contents/manifest.json?ref=master")
FILE_SHA=$(echo "$EXISTING_MANIFEST" | grep -o '"sha":"[^"]*"' | head -1 | cut -d'"' -f4)
if [ -n "$FILE_SHA" ]; then
curl -s -X PUT "$API_URL/repos/$REPO/contents/manifest.json" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"content\":\"$B64_CONTENT\", \"message\":\"Update manifest.json for ${{ github.ref_name }}\", \"sha\":\"$FILE_SHA\", \"branch\":\"manifest\"}"
-d "{\"content\":\"$B64_CONTENT\", \"message\":\"Update manifest.json for ${{ github.ref_name }}\", \"sha\":\"$FILE_SHA\", \"branch\":\"master\"}"
else
curl -s -X PUT "$API_URL/repos/$REPO/contents/manifest.json" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"content\":\"$B64_CONTENT\", \"message\":\"Create manifest.json for ${{ github.ref_name }}\", \"branch\":\"manifest\"}"
-d "{\"content\":\"$B64_CONTENT\", \"message\":\"Create manifest.json for ${{ github.ref_name }}\", \"branch\":\"master\"}"
fi