Skip to content

Commit

Permalink
Add separate GH workflow for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-punko committed Jan 5, 2024
1 parent f3aa2bc commit cf52e05
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/maven-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Pull request workflow
on:
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Build with Maven
run: mvn -B package --file pom.xml
5 changes: 2 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
Expand All @@ -13,7 +12,7 @@ jobs:
- uses: actions/checkout@v4

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

0 comments on commit cf52e05

Please sign in to comment.