mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-25 00:25:50 +00:00
Update maven.yml
This commit is contained in:
parent
aba969375a
commit
90077b2259
1 changed files with 27 additions and 4 deletions
31
.github/workflows/maven.yml
vendored
31
.github/workflows/maven.yml
vendored
|
@ -9,7 +9,7 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
build-and-test-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
@ -32,14 +32,37 @@ jobs:
|
|||
distribution: 'adopt'
|
||||
java-version: ${{ matrix.java-version }}
|
||||
- run: mvn -B install --no-transfer-progress --file pom.xml
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: spring-petclinic
|
||||
path: ${{ github.workspace }}/target/spring-petclinic*
|
||||
|
||||
|
||||
build-image-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-and-test]
|
||||
needs: [build-and-test-matrix]
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Setup Java and Build
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 8
|
||||
- run: mvn -B install --no-transfer-progress --file pom.xml
|
||||
|
||||
- name: Build image
|
||||
uses: bigloupe/buildpacks-action@master
|
||||
with:
|
||||
|
@ -47,4 +70,4 @@ jobs:
|
|||
tag: '1.0.0'
|
||||
path: 'target/spring-petclinic-2.4.5.jar'
|
||||
builder: 'gcr.io/paketo-buildpacks/builder:tiny'
|
||||
env: 'HELLO=WORLD FOO=BAR BAZ'
|
||||
env: 'BP_JVM_VERSION=8.*'
|
||||
|
|
Loading…
Reference in a new issue