mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 23:05:49 +00:00
Create a container Dockerfile and PR pipeline
This commit is contained in:
parent
383edc1656
commit
103a8ecb57
2 changed files with 32 additions and 0 deletions
25
.github/workflows/pr-workflow.yml
vendored
Normal file
25
.github/workflows/pr-workflow.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: PR Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: "17"
|
||||||
|
distribution: "corretto"
|
||||||
|
- uses: gradle/actions/setup-gradle@v3
|
||||||
|
with:
|
||||||
|
add-job-summary-as-pr-comment: on-failure
|
||||||
|
- name: Run Build & tests
|
||||||
|
env:
|
||||||
|
GRADLE_CREDS: ${{ secrets.GRADLE_CREDS }}
|
||||||
|
run: |
|
||||||
|
echo ${GRADLE_CREDS} | base64 --decode > ~/.gradle/gradle.properties
|
||||||
|
./gradlew build
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM amazoncorretto:17-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY build/libs/spring-petclinic-3.3.0.jar .
|
||||||
|
|
||||||
|
CMD [ "java", "-jar", "spring-petclinic-3.3.0.jar" ]
|
Loading…
Reference in a new issue