Fix malformed JSON secret files in Forgejo release workflow.
Some checks failed
Forgejo Release Builder / release (push) Failing after 3s

Write secrets via printf and validate with python json.tool so google-services and client secrets remain valid JSON in CI.
This commit is contained in:
littlecodedragon 2026-04-27 17:11:18 +02:00
parent 1fc3835259
commit 1f552c2774

View file

@ -68,18 +68,16 @@ jobs:
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
cat > app/google-services.json <<'EOF' printf '%s' "${{ secrets.GOOGLE_SERVICES_JSON }}" > app/google-services.json
${{ secrets.GOOGLE_SERVICES_JSON }} python3 -m json.tool app/google-services.json > /dev/null
EOF
- name: Write client_secrets.json - name: Write client_secrets.json
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
mkdir -p app/src/main/assets mkdir -p app/src/main/assets
cat > app/src/main/assets/client_secrets.json <<'EOF' printf '%s' "${{ secrets.GOOGLE_CLIENT_SECRETS_JSON }}" > app/src/main/assets/client_secrets.json
${{ secrets.GOOGLE_CLIENT_SECRETS_JSON }} python3 -m json.tool app/src/main/assets/client_secrets.json > /dev/null
EOF
- name: Prepare release metadata - name: Prepare release metadata
id: prepare id: prepare