From 2ec36e322d7685379dbbb7afe0a623776e3cc8c6 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Tue, 2 Jul 2024 14:01:09 +0530 Subject: [PATCH] Update the PR github workflow --- .github/workflows/pull-request.yml | 55 ++++++------------------------ 1 file changed, 11 insertions(+), 44 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c145e13ce..31e0976d0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,47 +1,14 @@ -name: PR build +name: PR Build -on: - pull_request: - push: - branches-ignore: - - master - - "automated/dependency_version_update" - - "automated/dependency_version_update_tmp" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true -jobs: - ubuntu-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17.0.7 - uses: actions/setup-java@v3 - with: - distribution: "adopt" - java-version: 17.0.7 - - name: Build with Gradle - env: - packageUser: ${{ github.actor }} - packagePAT: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew build codeCoverageReport --stacktrace --scan --console=plain --no-daemon - - name: Generate Codecov Report - if: github.event_name == 'pull_request' - uses: codecov/codecov-action@v1 +on: [pull_request] - windows-build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17.0.7 - uses: actions/setup-java@v3 - with: - distribution: "adopt" - java-version: 17.0.7 - - name: Build with Gradle - env: - packageUser: ${{ github.actor }} - packagePAT: ${{ secrets.GITHUB_TOKEN }} - JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 - run: ./gradlew.bat build --stacktrace --scan --console=plain --no-daemon +jobs: + call_workflow: + name: Run PR Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@main + secrets: inherit