GitHub Actions workflow improvements (#11507)

* Checkout merged branches for pull requests
* Add support for incremental add-on builds to speed up PR builds
* Echo the mvn command used for builds

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-11-04 09:05:39 +01:00
committed by GitHub
parent d46e3bccb5
commit 49aa537036
2 changed files with 93 additions and 19 deletions

View File

@@ -24,8 +24,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
if: github.head_ref == ''
uses: actions/checkout@v2
- name: Checkout merge
if: github.head_ref != ''
uses: actions/checkout@v2
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
- name: Set up Cache
uses: actions/cache@v2
with:
@@ -47,10 +54,17 @@ jobs:
with:
maven-version: ${{ matrix.maven }}
- name: Get Changed Files
id: files
uses: Ana06/get-changed-files@v2.0.0
with:
format: 'csv'
- name: Build
id: build
run: './.github/scripts/maven-build'
env:
CHANGED_FILES: ${{ steps.files.outputs.all }}
MAVEN_OPTS: >-
-Xmx2g
-Dmaven.wagon.http.retryHandler.count=5