Skip to content

Commit 465418a

Browse files
author
Arena Agent
committed
fix: use env var instead of secret expansion in workflow
1 parent b9f2ad3 commit 465418a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/deploy-purchase-verify.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Deploy to Deno Deploy
2525
env:
2626
DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }}
27+
GOOGLE_PLAY_SA_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
2728
run: |
2829
set -euo pipefail
2930
@@ -68,17 +69,16 @@ jobs:
6869
# Use --env flag to pass secrets directly to the deployment
6970
cd "$SRC_DIR"
7071
71-
if [ -n "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}" ]; then
72+
if [ -n "$GOOGLE_PLAY_SA_JSON" ]; then
7273
echo "Deploying with GOOGLE_PLAY_SERVICE_ACCOUNT_JSON..."
73-
# Escape the JSON for shell (newlines, quotes)
74-
SA_JSON=$(echo '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}' | jq -c .)
74+
# Use the env var directly - it's already valid JSON
7575
deno deploy \
7676
--org="$ORG" \
7777
--app="$APP" \
7878
--token="$DENO_DEPLOY_TOKEN" \
7979
--json --non-interactive \
8080
--prod \
81-
--env="GOOGLE_PLAY_SERVICE_ACCOUNT_JSON=$SA_JSON" \
81+
--env="GOOGLE_PLAY_SERVICE_ACCOUNT_JSON=$GOOGLE_PLAY_SA_JSON" \
8282
--env="ALLOWED_PACKAGE_NAME=io.github.android_poweruser" \
8383
.
8484
else

0 commit comments

Comments
 (0)