Skip to content

Main prbuilder check #1

Main prbuilder check

Main prbuilder check #1

Workflow file for this run

# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
#
# WSO2 LLC. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# --------------------------------------------------------------------------------------
# This workflow will run the build for PRs to check for any build related issues.
name: 👷 PR Builder
on:
pull_request:
types: [ opened, synchronize, labeled ]
branches: [ main ]
paths-ignore:
- "**/*.md"
- "**/LICENSE"
concurrency:
group: pr-builder-${{ github.ref }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
jobs:
check_for_android_changes:
name: 🤖 🔄 Check for Android Changes
runs-on: ubuntu-latest
outputs:
android_changed: ${{ steps.validate_android_changes.outputs.android_changed }}
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# token: ${{ env.GH_TOKEN }}
- name: ✅ Validate Android Changes
id: validate_android_changes
run: |
echo "Checking for Android changes"
android_changed=false
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q "android"; then
android_changed=true
fi
echo "android_changed=${android_changed}" >> $GITHUB_OUTPUT
asgardeo-android-sdk-builder:
name: 🤖 🚧 Asgardeo Android SDK Builder
needs: check_for_android_changes
if: needs.check_for_android_changes.outputs.android_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# token: ${{ env.GH_TOKEN }}
- name: ☕️ Set up Adopt JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
- name: 🚧 Build Asgardeo Android SDK
working-directory: .github/workflows/scripts/android
run: bash ./android_sdk_build.sh