Skip to content

Commit 28f557d

Browse files
Updated google-services.json to use base64 encoding in secrets variable.
1 parent 10765d9 commit 28f557d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/deploy-docker.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)