Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Jan 26, 2024
1 parent 9122d0f commit ef71a15
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit ef71a15

Please sign in to comment.