@@ -13,19 +13,36 @@ jobs:
1313 - name : Check out repository
1414 uses : actions/checkout@v3
1515
16- # Debug: Check length of the base64 secret
17- - name : Debug Check base64 secret length
18- run : echo -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | wc -c
16+ # Debug: Verify secret exists
17+ - name : Check secret presence
18+ run : |
19+ if [ -z "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" ]; then
20+ echo "❌ Critical error: GOOGLE_SERVICES_JSON_BASE64 secret is empty!"
21+ exit 1
22+ else
23+ echo "✅ Secret exists (length: ${#GOOGLE_SERVICES_JSON_BASE64} chars)"
24+ fi
25+ env :
26+ GOOGLE_SERVICES_JSON_BASE64 : ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
1927
20- # Decode the base64-encoded JSON secret into a file
28+ # Decode with error handling
2129 - name : Create google-services.json
2230 run : |
23- echo -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > google-services.json
24- # Optional: Check if decode succeeded
31+ set -e # Exit immediately on error
32+ echo "Decoding base64 secret..."
33+ echo "$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > google-services.json
34+
35+ echo "Verifying file:"
36+ ls -lh google-services.json
37+ file google-services.json
38+ head -n 2 google-services.json
39+
2540 if [ ! -s google-services.json ]; then
26- echo "❌ Error: google-services.json is empty or not created "
41+ echo "❌ File is empty! "
2742 exit 1
2843 fi
44+ env :
45+ GOOGLE_SERVICES_JSON_BASE64 : ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
2946
3047 # Create the .env file from a secret
3148 - name : Create .env file
0 commit comments