Update .gitea/workflows/build-android.yaml
Build Custom Bluesky APK / build-android (push) Failing after 33m42s

This commit is contained in:
2026-09-08 14:57:50 +00:00
parent 1e3636456b
commit 6320074cfc
+13 -11
View File
@@ -119,41 +119,43 @@ jobs:
GITEA_API: ${{ github.server_url }}/api/v1
REPO: ${{ github.repository }}
run: |
echo "API base: $GITEA_API"
echo "Repo: $REPO"
TAG="latest"
# Look up any existing "latest" release
EXISTING_RELEASE=$(curl -s \
EXISTING_RELEASE=$(curl -sS -w "\nHTTP_STATUS:%{http_code}" \
-H "Authorization: token $GITEA_TOKEN" \
"$GITEA_API/repos/$REPO/releases/tags/$TAG")
echo "Existing release lookup response: $EXISTING_RELEASE"
EXISTING_ID=$(echo "$EXISTING_RELEASE" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
# If it exists, delete the release itself
if [ -n "$EXISTING_ID" ]; then
echo "Deleting existing release ID: $EXISTING_ID"
curl -s -X DELETE \
curl -sS -w "\nHTTP_STATUS:%{http_code}" -X DELETE \
-H "Authorization: token $GITEA_TOKEN" \
"$GITEA_API/repos/$REPO/releases/$EXISTING_ID"
fi
# Delete the old tag too, so a fresh one can be created cleanly
curl -s -X DELETE \
echo "Deleting old tag..."
curl -sS -w "\nHTTP_STATUS:%{http_code}" -X DELETE \
-H "Authorization: token $GITEA_TOKEN" \
"$GITEA_API/repos/$REPO/tags/$TAG"
# Create the new rolling release
RELEASE_RESPONSE=$(curl -s -X POST \
echo "Creating new release..."
RELEASE_RESPONSE=$(curl -sS -w "\nHTTP_STATUS:%{http_code}" -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"$TAG\", \"name\": \"Latest Build\", \"body\": \"Automated build from commit ${{ github.sha }}\", \"draft\": false, \"prerelease\": false}" \
"$GITEA_API/repos/$REPO/releases")
echo "Create release response: $RELEASE_RESPONSE"
RELEASE_ID=$(echo "$RELEASE_RESPONSE" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
echo "Created release ID: $RELEASE_ID"
# Upload the APK as a release asset
curl -s -X POST \
echo "Uploading APK..."
curl -sS -w "\nHTTP_STATUS:%{http_code}" -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@bluesky-custom.apk" \
"$GITEA_API/repos/$REPO/releases/$RELEASE_ID/assets?name=bluesky-custom.apk"