-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3633 from vpPavithra/release-8.0.0_capacitor
Issue #ED-0000 feat: Added git actions
- Loading branch information
Showing
16 changed files
with
26,875 additions
and
24,227 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Android | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
jobs: | ||
build: | ||
environment: sunbird | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
cache: gradle | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install Ionic | ||
run: npm install -g @ionic/cli | ||
|
||
# - name: Install app dependencies | ||
# run: npm install | ||
|
||
# - name: Convert Windows line endings to Linux from the gradlew file | ||
# run: sudo apt update && sudo apt install dos2unix && cd android && dos2unix ./gradlew && cd .. | ||
|
||
# - name: Make ./gradlew command executable | ||
# run: cd android && chmod +x ./gradlew && cd .. | ||
|
||
# - name: Decode google-service | ||
# id: decode_google-service | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: 'google-services.json' | ||
# fileDir: '/home/runner/work/SunbirdEd-mobile-app/SunbirdEd-mobile-app/configurations/' | ||
# encodedString: ${{ secrets.GOOGLE_SERVICE_CONTENT }} | ||
|
||
# - name: Decode env file | ||
# id: decode_env | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: 'configuration.prod.ts' | ||
# fileDir: '/home/runner/work/SunbirdEd-mobile-app/SunbirdEd-mobile-app/configurations/' | ||
# encodedString: ${{ secrets.ENV }} | ||
|
||
# - name: Build Ionic assets | ||
# run: ionic build --prod && npx cap sync | ||
|
||
# - name: Execute test cases using JEST | ||
# working-directory: src/app | ||
# run: npm run test:ci | ||
|
||
# - name: Decode Keystore | ||
# id: decode_keystore | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: 'android_keystore.jks' | ||
# fileDir: '/home/runner/work/SunbirdEd-mobile-app/SunbirdEd-mobile-app/android/app/keystore/' | ||
# encodedString: ${{ secrets.KEYSTORE }} | ||
|
||
# - name: Decode signing properties | ||
# id: decode_properties | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: 'signing.properties' | ||
# fileDir: '/home/runner/work/SunbirdEd-mobile-app/SunbirdEd-mobile-app/android/' | ||
# encodedString: ${{ secrets.PROPERTIES }} | ||
|
||
# - name: Build bundle | ||
# run: cd android && ./gradlew app:bundleRelease | ||
# env: | ||
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | ||
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | ||
|
||
# - name: Build APK | ||
# run: cd android && ./gradlew assembleDebug | ||
|
||
# - name: Upload APK | ||
# uses: actions/[email protected] | ||
# with: | ||
# name: app-release | ||
# path: ${{ github.workspace }}/android/app/build/outputs/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Sonar | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Android] # Trigger when the Build-Test workflow completes | ||
branches: | ||
- 'release-**' | ||
- 'master' | ||
types: | ||
- completed # Trigger on completion of the Build-Test workflow | ||
|
||
jobs: | ||
SonarScanner: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' # Run job only if Build-Test workflow succeeded | ||
|
||
steps: | ||
# Checkout repository to ensure we have the latest code | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Sonar Scanner | ||
run: sudo npm install -g [email protected] | ||
|
||
- name: Debug Event Payload | ||
run: echo "${{ github.event.workflow_run.head_branch }}" | ||
|
||
- name: Extract Branch Name | ||
run: echo "${{ github.head_ref }}" | ||
|
||
- name: Print SONAR_TOKEN | ||
run: echo "SONAR_TOKEN=${{ secrets.SONAR_TOKEN }}PWR****123-${{ github.event.pull_request.number }}-${{ github.head_ref }}" | ||
|
||
- name: Run SonarQube Analysis | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
BRANCH_NAME: ${{ github.event.workflow_run.head_branch }} | ||
run: | | ||
sonar-scanner \ | ||
-Dsonar.login=$SONAR_TOKEN | ||
-Dsonar.pullrequest.key=${{ github.event.pull_requests.number }} \ | ||
-Dsonar.pullrequest.branch=${{ github.event.workflow_run.head_branch }} |
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
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
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
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
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
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
Oops, something went wrong.