diff --git a/.gitea/workflows/publish-ray-serve.yaml b/.gitea/workflows/publish-ray-serve.yaml index 541e686..2b3b229 100644 --- a/.gitea/workflows/publish-ray-serve.yaml +++ b/.gitea/workflows/publish-ray-serve.yaml @@ -63,6 +63,7 @@ jobs: env: TWINE_USERNAME: ${{ secrets.REGISTRY_USER }} TWINE_PASSWORD: ${{ secrets.REGISTRY_TOKEN }} + TWINE_REPOSITORY_URL: http://gitea-http.gitea.svc.cluster.local:3000/api/packages/daviestechlabs/pypi run: | cd ray-serve # Debug: check if secrets are set (don't print the token!) @@ -72,24 +73,8 @@ jobs: echo "ERROR: REGISTRY_USER or REGISTRY_TOKEN secrets not set" exit 1 fi - # Use internal cluster service URL directly - no SSL, no auth proxy - for file in dist/*.whl dist/*.tar.gz; do - if [ -f "$file" ]; then - echo "Uploading $file..." - response=$(curl -s -w "\n%{http_code}" -X POST \ - -u "$TWINE_USERNAME:$TWINE_PASSWORD" \ - -F "content=@$file" \ - "http://gitea-http.gitea.svc.cluster.local:3000/api/packages/daviestechlabs/pypi/upload") - http_code=$(echo "$response" | tail -n1) - body=$(echo "$response" | sed '$d') - echo "Response: $body" - echo "HTTP Code: $http_code" - if [ "$http_code" != "201" ] && [ "$http_code" != "200" ]; then - echo "Upload failed with HTTP $http_code" - exit 1 - fi - fi - done + # Use twine for proper PyPI upload protocol + python -m twine upload --verbose dist/* - name: Notify on success if: success()