File tree 1 file changed +10
-5
lines changed 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,26 @@ jobs:
17
17
- name : Debug Check base64 secret length
18
18
run : echo -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | wc -c
19
19
20
- # Decode the base64-encoded JSON secret into a file.
20
+ # Decode the base64-encoded JSON secret into a file
21
21
- name : Create google-services.json
22
22
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
24
29
25
- # Create the .env file from a secret (if needed)
30
+ # Create the .env file from a secret
26
31
- name : Create .env file
27
32
run : |
28
- printf "%s" "${{ secrets.ENV_FILE_CONTENT }}" > .env
33
+ echo -n "${{ secrets.ENV_FILE_CONTENT }}" > .env
29
34
30
35
# Debug: Check file size of google-services.json
31
36
- name : Check google-services.json file size
32
37
run : wc -c google-services.json
33
38
34
- # Debug: Validate JSON syntax (this will fail if the file is empty or invalid)
39
+ # Validate JSON syntax
35
40
- name : Validate google-services.json
36
41
run : node -e "JSON.parse(require('fs').readFileSync('google-services.json','utf8'))"
37
42
You can’t perform that action at this time.
0 commit comments