add subdomain #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Update Testing | |
on: | |
push: | |
branches: | |
- 'fix_fast_lane' | |
workflow_dispatch: | |
jobs: | |
# Step 1: Fetch Subdomains | |
fetch_subdomains: | |
runs-on: ubuntu-latest | |
outputs: | |
subdomains: ${{ steps.fetch.outputs.subdomains }} | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Fetch subdomains | |
id: fetch | |
run: | | |
# Simulating subdomain fetching; replace this with the actual fetching logic if needed | |
echo '[ "3ritechnologies", "aceachievers", "bpscconceptwallah", "catking", "civils360ias", "clinilaunchresearch", "delhiias", "dentalpulseacademy", "edzorblaw", "eecigate", "ekamias", "elajen", "eea", "erudite", "evolutioneducare", "elceducation", "fortuneiasacademy", "heritageonline", "igate", "ibs", "jkrc", "onlinejkshahclasses", "kpias", "kshitivivan", "legacyiasacademy", "logiceducation", "lucentias", "meritplus", "metagate", "metier", "mindworkzz", "mplus", "nammakpsc", "pnvermaclasses", "preppias", "rcreddyiasstudycircle", "rvmfs", "upscprep", "verandalearning", "wincentre", "xandylearning", "wellnessdesk", "Digiprepkit", "lms", "eenadupratibha", "lakshyagyananant", "ignoudost", "cuetbaba", "terzaghi", "gowthamtnpscclasses", "lalsacademy", "rajsacademy", "saavalclasses", "zaitoonvirtualcampus", "a2ztraining", "meritzone" ]' > subdomains.json | |
SUBDOMAINS=$(cat subdomains.json) | |
echo "::set-output name=subdomains::$SUBDOMAINS" | |
- name: Initialize success and failure lists | |
run: | | |
echo "SUCCESS_LIST=[]" >> $GITHUB_ENV | |
echo "FAILURE_LIST=[]" >> $GITHUB_ENV | |
# Step 2: Deploy App for Each Subdomain | |
deploy_app: | |
needs: fetch_subdomains | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
subdomain: ${{ fromJson(needs.fetch_subdomains.outputs.subdomains) }} | |
continue-on-error: true | |
env: | |
GITHUB_ACCESS_KEY: ${{ secrets.GH_ACCESS_KEY }} | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
API_ACCESS_KEY: ${{ secrets.API_ACCESS_KEY }} | |
steps: | |
- name: Validate subdomain | |
if: ${{ matrix.subdomain }} != 'all' | |
run: | | |
curl -f https://${{ matrix.subdomain }}.testpress.in/api/v2.5/admin/android/app-config/ -H "API-access-key: $API_ACCESS_KEY" | |
continue-on-error: true | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "corretto" | |
java-version: 11 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Caching Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Setup Ruby and Fastlane | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: Cache Zoom SDK files | |
id: zoom-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
./mobilertc | |
./commonlib | |
key: zoom_sdk_files | |
- name: Setup Zoom SDK | |
if: steps.zoom-cache.outputs.cache-hit != 'true' | |
run: | | |
wget https://media.testpress.in/static/android/zoom_sdk.zip | |
unzip -o ./zoom_sdk.zip | |
- name: Build and deploy app | |
id: deploy | |
run: | | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
bundle exec fastlane release_update_to subdomain:${{ matrix.subdomain }} release_option:draft | |
continue-on-error: true |