File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,26 @@ jobs:
1717 - name : Debug Check base64 secret length
1818 run : echo -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | wc -c
1919
20- # Decode the base64-encoded JSON secret into a file.
20+ # Decode the base64-encoded JSON secret into a file
2121 - name : Create google-services.json
2222 run : |
23- printf "%s" "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > google-services.json
23+ echo -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > google-services.json
24+ # Optional: Check if decode succeeded
25+ if [ ! -s google-services.json ]; then
26+ echo "❌ Error: google-services.json is empty or not created"
27+ exit 1
28+ fi
2429
25- # Create the .env file from a secret (if needed)
30+ # Create the .env file from a secret
2631 - name : Create .env file
2732 run : |
28- printf "%s" "${{ secrets.ENV_FILE_CONTENT }}" > .env
33+ echo -n "${{ secrets.ENV_FILE_CONTENT }}" > .env
2934
3035 # Debug: Check file size of google-services.json
3136 - name : Check google-services.json file size
3237 run : wc -c google-services.json
3338
34- # Debug: Validate JSON syntax (this will fail if the file is empty or invalid)
39+ # Validate JSON syntax
3540 - name : Validate google-services.json
3641 run : node -e "JSON.parse(require('fs').readFileSync('google-services.json','utf8'))"
3742
You can’t perform that action at this time.
0 commit comments