Browse Source

Update gradle.yml

Not to repeat allowing PRs break the build... CI build on PRs
Toni Helenius 1 year ago
parent
commit
b50837f1fa
1 changed files with 14 additions and 3 deletions
  1. 14 3
      .github/workflows/gradle.yml

+ 14 - 3
.github/workflows/gradle.yml

@@ -6,23 +6,34 @@ name: Nightly NBM Deployment
 on:
 on:
   push:
   push:
     branches: [ master ]
     branches: [ master ]
+  pull_request:
+  
 jobs:
 jobs:
-  build:
+  BuildSDK:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
 
 
     steps:
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
     - name: Set up JDK 21
     - name: Set up JDK 21
-      uses: actions/setup-java@v1
+      uses: actions/setup-java@v3
       with:
       with:
         java-version: 21
         java-version: 21
 
 
+    - name: Validate the Gradle wrapper
+    - uses: gradle/wrapper-validation-action@v2
+
     - name: Grant execute permission for gradle
     - name: Grant execute permission for gradle
       run: chmod +x gradlew
       run: chmod +x gradlew
       
       
     - name: Build the SDK
     - name: Build the SDK
       run: ./gradlew buildSdk
       run: ./gradlew buildSdk
+
+  NBMDeployment:
+    needs: [BuildSDK]
+    runs-on: ubuntu-latest
+    if: github.event_name == 'push'
     
     
+    steps:
     - name: Checkout the nightly-trigger repository
     - name: Checkout the nightly-trigger repository
       uses: actions/checkout@v2
       uses: actions/checkout@v2
       with:
       with: