Skip to content

Commit

Permalink
Fixing again.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalnomad91 committed Jan 31, 2025
1 parent 661f041 commit cfc094a
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/eas-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
outputs:
apk_path: ${{ steps.download.outputs.APK_PATH }}
steps:
- name: Checkout repository
- name: Checkout repository # Fix added here
uses: actions/checkout@v4

- name: Setup Node.js
Expand All @@ -78,10 +78,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y jq curl
- name: Install Project Dependencies (Including dotenv)
run: npm ci

- name: Verify Project Files
- name: Verify Project Files # Added verification step
run: |
echo "Current directory contents:"
ls -la
Expand All @@ -94,17 +91,21 @@ jobs:
BUILD_ID=${{ needs.build-android.outputs.build_id }}
echo "Starting build monitoring for BUILD_ID: $BUILD_ID"
# Initial check without JSON for better error visibility
npx eas build:view $BUILD_ID || true
RETRY_COUNT=0
MAX_RETRIES=120
SLEEP_TIME=30
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
echo -e "\n=== Attempt $((RETRY_COUNT+1))/$MAX_RETRIES ==="
BUILD_STATUS_JSON=$(npx eas build:view --build-id $BUILD_ID --json 2>/dev/null)
BUILD_STATUS_JSON=$(npx eas build:view --json $BUILD_ID)
echo "Raw API response: $BUILD_STATUS_JSON"
if [[ -z "$BUILD_STATUS_JSON" || "$BUILD_STATUS_JSON" == "null" ]]; then
# Validate JSON and check for empty response
if ! echo "$BUILD_STATUS_JSON" | jq empty >/dev/null 2>&1 || [[ -z "$BUILD_STATUS_JSON" ]]; then
echo "Error: Invalid or empty response from EAS API! Retrying..."
RETRY_COUNT=$((RETRY_COUNT+1))
sleep $SLEEP_TIME
Expand All @@ -128,15 +129,15 @@ jobs:
exit 0
;;
"errored"|"canceled")
if [[ "$BUILD_STATUS" == "canceled" ]]; then
echo "Build was canceled! Details:"
else
echo "Build failed! Error details:"
fi
echo "$BUILD_STATUS_JSON" | jq .
exit 1
;;
"errored"|"canceled")
if [[ "$BUILD_STATUS" == "canceled" ]]; then
echo "Build was canceled! Details:"
else
echo "Build failed! Error details:"
fi
echo "$BUILD_STATUS_JSON" | jq .
exit 1
;;
"new"|"in_queue"|"in_progress"|"pending")
echo "Build is still in progress..."
Expand Down

0 comments on commit cfc094a

Please sign in to comment.