Fix Forgejo CI: add verbose upload logging and timeout
Some checks failed
Release / build-and-release (push) Has been cancelled
Some checks failed
Release / build-and-release (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7b9ab383bc
commit
66b25dd707
1 changed files with 11 additions and 4 deletions
|
|
@ -142,13 +142,20 @@ jobs:
|
||||||
# Upload all assets
|
# Upload all assets
|
||||||
for file in release-assets/*; do
|
for file in release-assets/*; do
|
||||||
FILENAME=$(basename "$file")
|
FILENAME=$(basename "$file")
|
||||||
echo "Uploading: $FILENAME"
|
FILESIZE=$(stat -c%s "$file")
|
||||||
curl -s -X POST \
|
echo "Uploading: $FILENAME (${FILESIZE} bytes)"
|
||||||
|
HTTP_CODE=$(curl -w "%{http_code}" --max-time 300 -X POST \
|
||||||
"${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${FILENAME}" \
|
"${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${FILENAME}" \
|
||||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary "@${file}"
|
--data-binary "@${file}" \
|
||||||
|
-o /tmp/upload_response.json)
|
||||||
|
echo "HTTP $HTTP_CODE"
|
||||||
|
if [ "$HTTP_CODE" != "201" ]; then
|
||||||
|
echo "Upload failed:"
|
||||||
|
cat /tmp/upload_response.json
|
||||||
echo ""
|
echo ""
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Release created: ${GITHUB_SERVER_URL}/${REPO}/releases/tag/${TAG}"
|
echo "Release created: ${GITHUB_SERVER_URL}/${REPO}/releases/tag/${TAG}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue