From ef71a15993e9300dfaa254aa10cfda0531c08740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theodor=20Angerg=C3=A5rd?= Date: Fri, 26 Jan 2024 20:39:56 +0100 Subject: [PATCH] Test --- .github/workflows/gradle.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dad5fd3a0..cc1b90f57 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,17 +10,33 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: java-version: "21" distribution: "adopt" + - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b - - name: Testing - working-directory: ./app - run: ./gradlew test + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker Build-Tag-Push my-app + run: | + ./gradlew bootImageBuild + docker tag my-app:1.0.0-SNAPSHOT ${{ secrets.DOCKERHUB_USERNAME }}/my-app:latest + docker push ${{ secrets.DOCKERHUB_USERNAME }}/my-app:latest + - name: Cleanup Gradle Cache + # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. # Restoring these files from a GitHub Actions cache might cause problems for future builds. run: |