From d3dcd2eff2927582e6f26b6f3666d5535ccbbddf Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 31 Oct 2024 19:29:48 +0530 Subject: [PATCH] Improved the retrieving the secrets from github in our CD. --- .github/workflows/cd.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f0c9bb0..c59047e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -34,17 +34,18 @@ jobs: - name: Set non-kiwix organization tag run: | - non_kiwix_organization_tag="PLAYSTORE_JSON_${TAG}" + non_kiwix_organization_tag="PLAYSTORE_JSON_${TAG^^}" echo "NON_KIWIX_ORGANIZATION_TAG=${non_kiwix_organization_tag}" >> $GITHUB_ENV - name: Preparing signing material env: keystore: ${{ secrets.keystore }} playstore_json: ${{ secrets.PLAYSTORE_JSON }} + non_kiwix_organization_json: ${{ secrets[env.NON_KIWIX_ORGANIZATION_TAG] }} run: | echo "$keystore" | base64 -d > kiwix-android/kiwix-android.keystore - if [ -n "${{ secrets[env.non_kiwix_organization_tag] }}" ]; then - echo "${{ secrets[env.non_kiwix_organization_tag] }}" > kiwix-android/playstore.json + if [ -n "$non_kiwix_organization_json" ]; then + echo "$non_kiwix_organization_json" > kiwix-android/playstore.json else echo "$playstore_json" > kiwix-android/playstore.json fi