Skip to content

Commit

Permalink
Merge pull request #29 from KavinduZoysa/add-pull-request-action
Browse files Browse the repository at this point in the history
Add pull request GitHub action
  • Loading branch information
KavinduZoysa authored Jun 17, 2024
2 parents cd22e2a + 8412e27 commit 8e94bb5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PR Build

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

on: pull_request

jobs:
ubuntu-build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.head_ref }}-ubuntu-build
cancel-in-progress: true
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: latest

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7

- name: Set ENV Variables
run: |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build the Package
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew clean -x test -x check :mi-ballerina:localPublish && ./gradlew clean -x test -x check :tool-mi:localPublish
./gradlew build
- name: Generate Codecov Report
uses: codecov/codecov-action@v3

0 comments on commit 8e94bb5

Please sign in to comment.