Skip to content

Commit cfc094a

Browse files
Fixing again.
1 parent 661f041 commit cfc094a

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/eas-android-build.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
outputs:
6565
apk_path: ${{ steps.download.outputs.APK_PATH }}
6666
steps:
67-
- name: Checkout repository
67+
- name: Checkout repository # Fix added here
6868
uses: actions/checkout@v4
6969

7070
- name: Setup Node.js
@@ -78,10 +78,7 @@ jobs:
7878
sudo apt-get update
7979
sudo apt-get install -y jq curl
8080
81-
- name: Install Project Dependencies (Including dotenv)
82-
run: npm ci
83-
84-
- name: Verify Project Files
81+
- name: Verify Project Files # Added verification step
8582
run: |
8683
echo "Current directory contents:"
8784
ls -la
@@ -94,17 +91,21 @@ jobs:
9491
BUILD_ID=${{ needs.build-android.outputs.build_id }}
9592
echo "Starting build monitoring for BUILD_ID: $BUILD_ID"
9693
94+
# Initial check without JSON for better error visibility
95+
npx eas build:view $BUILD_ID || true
96+
9797
RETRY_COUNT=0
9898
MAX_RETRIES=120
9999
SLEEP_TIME=30
100100
101101
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
102102
echo -e "\n=== Attempt $((RETRY_COUNT+1))/$MAX_RETRIES ==="
103103
104-
BUILD_STATUS_JSON=$(npx eas build:view --build-id $BUILD_ID --json 2>/dev/null)
104+
BUILD_STATUS_JSON=$(npx eas build:view --json $BUILD_ID)
105105
echo "Raw API response: $BUILD_STATUS_JSON"
106106
107-
if [[ -z "$BUILD_STATUS_JSON" || "$BUILD_STATUS_JSON" == "null" ]]; then
107+
# Validate JSON and check for empty response
108+
if ! echo "$BUILD_STATUS_JSON" | jq empty >/dev/null 2>&1 || [[ -z "$BUILD_STATUS_JSON" ]]; then
108109
echo "Error: Invalid or empty response from EAS API! Retrying..."
109110
RETRY_COUNT=$((RETRY_COUNT+1))
110111
sleep $SLEEP_TIME
@@ -128,15 +129,15 @@ jobs:
128129
exit 0
129130
;;
130131
131-
"errored"|"canceled")
132-
if [[ "$BUILD_STATUS" == "canceled" ]]; then
133-
echo "Build was canceled! Details:"
134-
else
135-
echo "Build failed! Error details:"
136-
fi
137-
echo "$BUILD_STATUS_JSON" | jq .
138-
exit 1
139-
;;
132+
"errored"|"canceled")
133+
if [[ "$BUILD_STATUS" == "canceled" ]]; then
134+
echo "Build was canceled! Details:"
135+
else
136+
echo "Build failed! Error details:"
137+
fi
138+
echo "$BUILD_STATUS_JSON" | jq .
139+
exit 1
140+
;;
140141
141142
"new"|"in_queue"|"in_progress"|"pending")
142143
echo "Build is still in progress..."

0 commit comments

Comments
 (0)