File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,21 @@ jobs:
1313 - name : Check out repository
1414 uses : actions/checkout@v3
1515
16+ # Decode the base64-encoded google-services.json secret into a file.
1617 - name : Create google-services.json
1718 run : |
18- # Use printf to preserve formatting and newlines
19- printf "%s" "${{ secrets.GOOGLE_SERVICES_JSON }}" > google-services.json
19+ echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > google-services.json
2020
21+ # Create the .env file from a secret (if needed)
2122 - name : Create .env file
2223 run : |
2324 printf "%s" "${{ secrets.ENV_FILE_CONTENT }}" > .env
2425
25- # Debug: Check file size
26+ # Debug: Check file size (optional)
2627 - name : Check google-services.json file size
2728 run : wc -c google-services.json
2829
29- # Debug : Validate JSON syntax (this will fail if the JSON is invalid)
30+ # Optional : Validate JSON syntax (will fail if invalid)
3031 - name : Validate google-services.json
3132 run : node -e "JSON.parse(require('fs').readFileSync('google-services.json','utf8'))"
3233
You can’t perform that action at this time.
0 commit comments