Skip to content

Commit fcd7785

Browse files
authored
Merge pull request #1568 from ohbus/master
Update Pull Requests CI trigger behaviour
2 parents 2432d12 + 38cc490 commit fcd7785

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/maven-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939

4040
steps:
4141

42-
- uses: actions/checkout@v2
42+
- name: Checkout Code
43+
uses: actions/checkout@v2
4344
with:
4445
# Disabling shallow clone for improving relevancy of SonarQube reporting
4546
fetch-depth: 0
@@ -56,7 +57,8 @@ jobs:
5657
key: ${{ runner.os }}-sonar
5758
restore-keys: ${{ runner.os }}-sonar
5859

59-
- uses: actions/cache@v2
60+
- name: Cache Maven dependencies
61+
uses: actions/cache@v2
6062
with:
6163
path: ~/.m2/repository
6264
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/maven-pr-builder.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,34 @@ name: Java PR Builder
2929
on:
3030
pull_request:
3131
branches: [ master ]
32+
types: [ opened, reopened, synchronize, labeled, unlabeled ]
3233

3334
jobs:
3435
build:
3536

3637
runs-on: ubuntu-20.04
3738

3839
steps:
39-
- uses: actions/checkout@v2
40+
- name: Checkout Code
41+
uses: actions/checkout@v2
42+
4043
- name: Set up JDK 11
4144
uses: actions/setup-java@v1
4245
with:
4346
java-version: 11
44-
- uses: actions/cache@v2
47+
48+
- name: Cache Maven Dependecies
49+
uses: actions/cache@v2
4550
with:
4651
path: ~/.m2/repository
4752
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
4853
restore-keys: |
4954
${{ runner.os }}-maven-
55+
5056
# Some tests need screen access
5157
- name: Install xvfb
5258
run: sudo apt-get install -y xvfb
59+
5360
# This worflow is only for building Pull Requests, the master branch runs Sonar analysis on the main repository.
5461
# SonarQube scan does not work for forked repositories.
5562
# See https://jira.sonarsource.com/browse/MMF-1371

0 commit comments

Comments
 (0)