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:
13
13
- name : Check out repository
14
14
uses : actions/checkout@v3
15
15
16
+ # Decode the base64-encoded google-services.json secret into a file.
16
17
- name : Create google-services.json
17
18
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
20
20
21
+ # Create the .env file from a secret (if needed)
21
22
- name : Create .env file
22
23
run : |
23
24
printf "%s" "${{ secrets.ENV_FILE_CONTENT }}" > .env
24
25
25
- # Debug: Check file size
26
+ # Debug: Check file size (optional)
26
27
- name : Check google-services.json file size
27
28
run : wc -c google-services.json
28
29
29
- # Debug : Validate JSON syntax (this will fail if the JSON is invalid)
30
+ # Optional : Validate JSON syntax (will fail if invalid)
30
31
- name : Validate google-services.json
31
32
run : node -e "JSON.parse(require('fs').readFileSync('google-services.json','utf8'))"
32
33
You can’t perform that action at this time.
0 commit comments