Skip to content

Commit 9d9f3f4

Browse files
More debugging.
1 parent 89843d4 commit 9d9f3f4

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/workflows/deploy-docker.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,36 @@ jobs:
1313
- name: Check out repository
1414
uses: actions/checkout@v3
1515

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 }}
1927

20-
# Decode the base64-encoded JSON secret into a file
28+
# Decode with error handling
2129
- name: Create google-services.json
2230
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+
2540
if [ ! -s google-services.json ]; then
26-
echo "❌ Error: google-services.json is empty or not created"
41+
echo "❌ File is empty!"
2742
exit 1
2843
fi
44+
env:
45+
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
2946

3047
# Create the .env file from a secret
3148
- name: Create .env file

0 commit comments

Comments
 (0)