@@ -13,19 +13,36 @@ jobs:
13
13
- name : Check out repository
14
14
uses : actions/checkout@v3
15
15
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 }}
19
27
20
- # Decode the base64-encoded JSON secret into a file
28
+ # Decode with error handling
21
29
- name : Create google-services.json
22
30
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
+
25
40
if [ ! -s google-services.json ]; then
26
- echo "❌ Error: google-services.json is empty or not created "
41
+ echo "❌ File is empty! "
27
42
exit 1
28
43
fi
44
+ env :
45
+ GOOGLE_SERVICES_JSON_BASE64 : ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
29
46
30
47
# Create the .env file from a secret
31
48
- name : Create .env file
0 commit comments