fix: use direct Forgejo port 3001 for uploads (bypass Traefik+Cloudflare)

- FORGEJO_UPLOAD now uses http://208.69.78.130:3001 (plain HTTP direct to Forgejo)
- Removed -sk flags and Host headers (not needed for plain HTTP)
- Added --max-time 600 for large file uploads
- Cloudflare 100MB limit and Traefik HTTP/2 stream errors both bypassed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sanasol
2026-02-20 02:24:17 +01:00
parent e0ebf137fc
commit c4b5368538

View File

@@ -9,8 +9,8 @@ on:
env: env:
# Domain for small API calls (goes through Cloudflare - fine for <100MB) # Domain for small API calls (goes through Cloudflare - fine for <100MB)
FORGEJO_API: https://git.sanhost.net/api/v1 FORGEJO_API: https://git.sanhost.net/api/v1
# Direct IP for large file uploads to bypass Cloudflare 100MB limit # Direct to Forgejo port (bypasses Cloudflare + Traefik for large uploads)
FORGEJO_UPLOAD: https://208.69.78.130/api/v1 FORGEJO_UPLOAD: http://208.69.78.130:3001/api/v1
jobs: jobs:
create-release: create-release:
@@ -55,8 +55,7 @@ jobs:
for file in dist/*.exe dist/*.exe.blockmap dist/latest.yml; do for file in dist/*.exe dist/*.exe.blockmap dist/latest.yml; do
[ -f "$file" ] || continue [ -f "$file" ] || continue
echo "Uploading $file..." echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file" -F "attachment=@${file}" || echo "Failed to upload $file"
done done
@@ -87,15 +86,14 @@ jobs:
for file in dist/*.dmg dist/*.zip dist/*.blockmap dist/latest-mac.yml; do for file in dist/*.dmg dist/*.zip dist/*.blockmap dist/latest-mac.yml; do
[ -f "$file" ] || continue [ -f "$file" ] || continue
echo "Uploading $file..." echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file" -F "attachment=@${file}" || echo "Failed to upload $file"
done done
build-linux: build-linux:
needs: [create-release]
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [create-release]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install build dependencies - name: Install build dependencies
@@ -118,8 +116,7 @@ jobs:
for file in dist/*.AppImage dist/*.AppImage.blockmap dist/*.deb dist/*.rpm dist/latest-linux.yml; do for file in dist/*.AppImage dist/*.AppImage.blockmap dist/*.deb dist/*.rpm dist/latest-linux.yml; do
[ -f "$file" ] || continue [ -f "$file" ] || continue
echo "Uploading $file..." echo "Uploading $file..."
curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \
-H "Host: git.sanhost.net" \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-F "attachment=@${file}" || echo "Failed to upload $file" -F "attachment=@${file}" || echo "Failed to upload $file"
done done