From 9b1b82abafa05c36bd3b090df5a04a1d68a4be7e Mon Sep 17 00:00:00 2001 From: Swati Goel Date: Thu, 9 May 2024 00:35:39 +0530 Subject: [PATCH 1/2] Revert "Revert "[INJIMOB-990] add a job to set the client id and pass to reusable workflow (#1348)" (#1395)" This reverts commit 1e29e8443f5d9390ba6a032f1dbf8c2d7900f62a. --- .github/keys/mosipgpgkey_pub.gpg | Bin 1270 -> 0 bytes .github/keys/mosipgpgkey_sec.gpg | Bin 2663 -> 0 bytes .github/scripts/set-google-clientid.sh | 18 ++++++++++++++++++ .github/workflows/internal-build.yml | 16 +++++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) delete mode 100644 .github/keys/mosipgpgkey_pub.gpg delete mode 100644 .github/keys/mosipgpgkey_sec.gpg create mode 100755 .github/scripts/set-google-clientid.sh diff --git a/.github/keys/mosipgpgkey_pub.gpg b/.github/keys/mosipgpgkey_pub.gpg deleted file mode 100644 index 4bdb1a947beaa877a93b56a2074580cdd9bf0578..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1270 zcmbQq$jcHZy2y@^gW*i(B_ZoOO}xok8QrJ7Cf&}qetdqLrPuP}`P;)T-Y(VI_HkO_ z1{{w_f#RHj!qd-^bJoQmWM7;XW@lbzf|A4J(W)_uZi-T`J_?5k8I!A{8+V6Y2-?iCh1xP-B zIq6E*9lP}7Ro)kBJiO-Q-t)Wj;Fy-k3!e44+^24G7$(eOmrP(w-?^yl?-s_Lj~{U? z|Iz2Tvh0=vd*g}qnQnX5u8!QgWqQ&|20=y!#w{MX`Nf$93K}69nZ*h~1mWf;mZjz? zB&X(;6eZ>;6r~pAYbw})rSwvB6Ek!2@=G$)GE<8j(m_1E^d-NQtB%>uiS4{`PS#`d z!2|Vwjd%R@+!xB97yY%eDJ><;wy?==@1nw%l1YihOg~;t$!Xr>^ncmLm-3sEy5o&z z7@iA#{p{Nz<!2>s$RBXB1ov96vXdr)51sAImSU;o{c6)J0UM44_b zpVf0M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ra{iP~ z?1`I{(IE{)wYI0 zp?Lro`tclyiF&K_MBTH9kbUsg=yu-maA!*_U*}`HPj-_Wbh&ke5YP9M2PwKR~+0n z`yU!zDyk)lFb4N<72OjB)L)J#F`fE*5><~{u0AZpb_3h}4U&GS>wU*FJ#yt)=4Y@a SkkiE(Bh1Lh;14qU=Klc8TJt&p diff --git a/.github/scripts/set-google-clientid.sh b/.github/scripts/set-google-clientid.sh new file mode 100755 index 0000000000..a5d6fb4cbc --- /dev/null +++ b/.github/scripts/set-google-clientid.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +flavor="$1" + +if [[ "$flavor" == "residentapp" ]]; then + echo "CLIENT_ID=INJI_GOOGLE_CLIENT_ID" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "collab" ]]; then + echo "CLIENT_ID=COLLAB_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "synergy" ]]; then + echo "CLIENT_ID=SYNERGY_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "inji" ]]; then + echo "CLIENT_ID=INJI_ORG_KEY" >> $GITHUB_OUTPUT +elif [[ "$flavor" == "mec" ]]; then + echo "CLIENT_ID=MEC_ORG_KEY" >> $GITHUB_OUTPUT +else + echo "Error: Invalid flavor '$flavor'" + exit 1 +fi \ No newline at end of file diff --git a/.github/workflows/internal-build.yml b/.github/workflows/internal-build.yml index f1bb7f9d7d..8c44d25eed 100644 --- a/.github/workflows/internal-build.yml +++ b/.github/workflows/internal-build.yml @@ -81,8 +81,22 @@ on: - true jobs: + set-client-id: + runs-on: ubuntu-latest + outputs: + CLIENT_ID: ${{ steps.client-id.outputs.CLIENT_ID }} + steps: + - name: Set Google client id + id: client-id + run: + cd .github/scripts + ./set-google-clientid.sh "$INJI_FLAVOR" + env: + INJI_FLAVOR: ${{ github.event.inputs.injiFlavor }} + build-android: if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android'}} + needs: set-client-id uses: mosip/kattu/.github/workflows/android-publish.yml@master with: RELEASE: ${{ inputs.release }} @@ -105,7 +119,7 @@ jobs: RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}' INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }} SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}' - GOOGLE_ANDROID_CLIENT_ID: ${{secrets.INJI_GOOGLE_CLIENT_ID}} + GOOGLE_ANDROID_CLIENT_ID: ${{ secrets[needs.set-client-id.outputs.CLIENT_ID] }} build-android-beta: if: ${{ inputs.release == 'beta' && (inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android') }} From cd7ac9e8715df3c424200c59754738e03d8fe03e Mon Sep 17 00:00:00 2001 From: Swati Goel Date: Thu, 9 May 2024 00:36:42 +0530 Subject: [PATCH 2/2] [INJIMOB-990] - fix step to get client-id based on app flavor Signed-off-by: Swati Goel --- .github/workflows/internal-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/internal-build.yml b/.github/workflows/internal-build.yml index 8c44d25eed..c94be9cc45 100644 --- a/.github/workflows/internal-build.yml +++ b/.github/workflows/internal-build.yml @@ -86,9 +86,10 @@ jobs: outputs: CLIENT_ID: ${{ steps.client-id.outputs.CLIENT_ID }} steps: + - uses: actions/checkout@v3.1.0 - name: Set Google client id id: client-id - run: + run: | cd .github/scripts ./set-google-clientid.sh "$INJI_FLAVOR" env: