diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 000000000..aaf407311 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,28 @@ +--- +name: Build to Docker Hub + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build & publish the project + run: mvn compile jib:build -X -DjibSerialize=true diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 6c38e8426..3651346b9 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-java@v2 with: java-version: '17' - distribution: 'adopt' + distribution: 'temurin' cache: maven - name: Build with Maven run: mvn -B install --file pom.xml -Djacoco.skip=true -DdisableXmlReport=true diff --git a/pom.xml b/pom.xml index c95b91e87..bd7d25ee1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ - + 1.2.1.RELEASE 2.0.2 0.2.1 @@ -31,7 +31,7 @@ 3.2.0 - 1.3.0 + 3.4.0 springcommunity 3.8.1 diff --git a/readme.md b/readme.md index 790ed8406..a50d3b99e 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,7 @@ # REST version of Spring PetClinic Sample Application (spring-framework-petclinic extend ) -[![Build Status](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/maven-build.yml/badge.svg)](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/maven-build.yml) +[![Java Build Status](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/maven-build.yml/badge.svg)](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/maven-build.yml) +[![Docker Build Status](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/docker-build.yml/badge.svg)](https://github.com/spring-petclinic/spring-petclinic-rest/actions/workflows/docker-build.yml) This backend version of the Spring Petclinic application only provides a REST API. **There is no UI**. The [spring-petclinic-angular project](https://github.com/spring-petclinic/spring-petclinic-angular) is a Angular front-end application which consumes the REST API.