File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
5+ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+ name : Java CI with Gradle
9+
10+ on :
11+ push :
12+ workflow_dispatch :
13+
14+ permissions :
15+ contents : read
16+
17+ jobs :
18+ build :
19+
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - uses : actions/checkout@v4
24+ - name : Set up JDK 17
25+ uses : actions/setup-java@v3
26+ with :
27+ java-version : ' 17'
28+ distribution : ' temurin'
29+ cache : gradle
30+ - name : Restore gradle.properties
31+ env :
32+ GRADLE_PROPERTIES : ${{ secrets.GRADLE_PROPERTIES }}
33+ shell : bash
34+ run : |
35+ mkdir -p ~/.gradle/
36+ echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
37+ echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
38+ - name : Restore gpg key
39+ env :
40+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
41+ shell : bash
42+ run : |
43+ mkdir /home/runner/.gnupg
44+ echo -n "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > /home/runner/.gnupg/secring.gpg
45+ - name : Execute Gradle build
46+ run : ./gradlew clean build --info
47+ - name : Upload test reports
48+ uses : actions/upload-artifact@v4
49+ if : always()
50+ with :
51+ name : test-reports
52+ path : " **/build/reports/*"
53+ retention-days : 5
You can’t perform that action at this time.
0 commit comments