mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-20 02:21:11 +00:00
Added resources for the CICD setup
This commit is contained in:
parent
aa2273e955
commit
c9746bb6da
6 changed files with 87 additions and 0 deletions
28
.github/workflows/build.yml
vendored
Normal file
28
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Build and Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Build with Maven
|
||||
run: ./mvnw package -B
|
||||
|
||||
- name: Build Docker Image
|
||||
run: docker build -t petclinic:${{ github.sha }} .
|
||||
|
||||
- name: Test
|
||||
run: ./mvnw test
|
||||
Loading…
Add table
Add a link
Reference in a new issue