mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:35:50 +00:00
ben change
This commit is contained in:
parent
0aa3adb56f
commit
045b87a145
2 changed files with 21 additions and 0 deletions
12
.github/workflows/maven-build.yml
vendored
12
.github/workflows/maven-build.yml
vendored
|
@ -27,3 +27,15 @@ jobs:
|
|||
cache: maven
|
||||
- name: Build with Maven Wrapper
|
||||
run: ./mvnw -B package
|
||||
|
||||
# Added
|
||||
|
||||
- name: Run Tests
|
||||
run: mvn test --file pom.xml
|
||||
|
||||
- name: Build Docker Image
|
||||
run: docker build -t bengold7/spring-petclinic:latest .
|
||||
|
||||
- name: Scan Docker Image
|
||||
run: |
|
||||
docker scan --file=Dockerfile --severity=high bengold7/spring-petclinic:latest
|
||||
|
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM adoptopenjdk:17-jre-hotspot
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY target/spring-petclinic*.jar app.jar
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
Loading…
Reference in a new issue