From 7dd7ce4cad53e685009d82fe170e56a612549d61 Mon Sep 17 00:00:00 2001 From: Julian Date: Thu, 22 Dec 2022 11:53:40 +0100 Subject: [PATCH] github actions support --- .github/workflows/docker.yml | 11 ++++++++--- Dockerfile | 7 +------ build.gradle | 5 ++--- settings.gradle | 1 + 4 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 settings.gradle diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a85be48..ad07286 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,10 +9,15 @@ jobs: name: Build Docker image runs-on: ubuntu-latest steps: - - name: Checkout + - name: Check out code uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + - name: Setup JDK + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Test Coverage + run: ./gradlew clean build jacocoTestReport jacocoFix --scan - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: diff --git a/Dockerfile b/Dockerfile index da667a0..5bf953c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,3 @@ -FROM eclipse-temurin:17 AS builder -COPY . /src -WORKDIR /src -RUN ./gradlew build - FROM ghcr.io/wisvch/spring-boot-base:2.5.5 -COPY --from=builder /src/build/libs/feedback.jar /srv/feedback.jar +COPY ./build/libs/feedback.jar /srv/feedback.jar CMD ["/srv/feedback.jar"] \ No newline at end of file diff --git a/build.gradle b/build.gradle index 24fe0e4..d8c26d8 100644 --- a/build.gradle +++ b/build.gradle @@ -98,6 +98,5 @@ task jacocoFix(type: Copy) { } } -test { - maxHeapSize = "4096m" -} +check.dependsOn jacocoTestReport + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..2e2529b --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'feedback' \ No newline at end of file