From c4b5368538fa3a580e15a204fa269221213ce3ed Mon Sep 17 00:00:00 2001 From: sanasol Date: Fri, 20 Feb 2026 02:24:17 +0100 Subject: [PATCH] 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 --- .github/workflows/release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45da66d..1336f5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,8 @@ on: env: # Domain for small API calls (goes through Cloudflare - fine for <100MB) FORGEJO_API: https://git.sanhost.net/api/v1 - # Direct IP for large file uploads to bypass Cloudflare 100MB limit - FORGEJO_UPLOAD: https://208.69.78.130/api/v1 + # Direct to Forgejo port (bypasses Cloudflare + Traefik for large uploads) + FORGEJO_UPLOAD: http://208.69.78.130:3001/api/v1 jobs: create-release: @@ -55,8 +55,7 @@ jobs: for file in dist/*.exe dist/*.exe.blockmap dist/latest.yml; do [ -f "$file" ] || continue echo "Uploading $file..." - curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ - -H "Host: git.sanhost.net" \ + curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -F "attachment=@${file}" || echo "Failed to upload $file" done @@ -87,15 +86,14 @@ jobs: for file in dist/*.dmg dist/*.zip dist/*.blockmap dist/latest-mac.yml; do [ -f "$file" ] || continue echo "Uploading $file..." - curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ - -H "Host: git.sanhost.net" \ + curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -F "attachment=@${file}" || echo "Failed to upload $file" done build-linux: - needs: [create-release] runs-on: ubuntu-latest + needs: [create-release] steps: - uses: actions/checkout@v4 - 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 [ -f "$file" ] || continue echo "Uploading $file..." - curl -sk -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ - -H "Host: git.sanhost.net" \ + curl -s --max-time 600 -X POST "${FORGEJO_UPLOAD}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename $file)" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -F "attachment=@${file}" || echo "Failed to upload $file" done