Skip to content

Commit 46dbf0c

Browse files
committed
Add separate GH workflow for PRs. Add ability to run GH workflow manually
1 parent b25b7f1 commit 46dbf0c

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/gradle-pr.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pull request workflow
2+
on:
3+
pull_request:
4+
branches: [ master ]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
with: # Needed to make checkout of Git submodule too
13+
submodules: 'true'
14+
15+
- name: Set up JDK
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '21'
20+
cache: 'gradle'
21+
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
25+
- name: Build with Gradle
26+
run: ./gradlew build --no-daemon

.github/workflows/gradle.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ name: Java CI with Gradle
22
on:
33
push:
44
branches: [ master ]
5-
pull_request:
6-
branches: [ master ]
5+
workflow_dispatch:
76

87
jobs:
98
build:
109
runs-on: ubuntu-latest
1110

1211
steps:
1312
- uses: actions/checkout@v4
13+
with:
14+
submodules: 'true'
1415

1516
- name: Set up JDK
1617
uses: actions/setup-java@v4

0 commit comments

Comments
 (0)