Skip to content

Commit

Permalink
Merge pull request #1436 from mosip/injimob-990-fix-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sree96 authored May 9, 2024
2 parents 20a231a + cd7ac9e commit 0ff5158
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
Binary file removed .github/keys/mosipgpgkey_pub.gpg
Binary file not shown.
Binary file removed .github/keys/mosipgpgkey_sec.gpg
Binary file not shown.
18 changes: 18 additions & 0 deletions .github/scripts/set-google-clientid.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 16 additions & 1 deletion .github/workflows/internal-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,23 @@ on:
- true

jobs:
set-client-id:
runs-on: ubuntu-latest
outputs:
CLIENT_ID: ${{ steps.client-id.outputs.CLIENT_ID }}
steps:
- uses: actions/[email protected]
- 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 }}
Expand All @@ -105,7 +120,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') }}
Expand Down

0 comments on commit 0ff5158

Please sign in to comment.