Skip to content

Commit de20484

Browse files
authored
Use gradle/gradle-build-action (#6121)
1 parent 2b61912 commit de20484

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

.github/workflows/ci-examples.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ jobs:
2424
with:
2525
java-version: '8.0.302'
2626
distribution: temurin
27-
- name: Cache Gradle Home files
28-
uses: actions/[email protected]
29-
continue-on-error: true
30-
with:
31-
path: ~/.gradle/caches
32-
key: ${{ runner.os }}-gradle-home-testmatrix-examples-${{ hashFiles('**/*.gradle') }}
27+
- name: Setup Gradle Build Action
28+
uses: gradle/gradle-build-action@v2
3329
- id: set-matrix
3430
working-directory: ./examples/
3531
env:
@@ -52,14 +48,12 @@ jobs:
5248
with:
5349
java-version: '8.0.302'
5450
distribution: temurin
55-
- name: Cache Gradle Home files
56-
uses: actions/[email protected]
57-
continue-on-error: true
58-
with:
59-
path: ~/.gradle/caches
60-
key: ${{ runner.os }}-gradle-home-examples-${{matrix.gradle_args}}_check-${{ hashFiles('**/*.gradle') }}
6151
- name: Clear existing docker image cache
6252
run: docker image prune -af
53+
- name: Setup Gradle Build Action
54+
uses: gradle/gradle-build-action@v2
55+
with:
56+
gradle-home-cache-cleanup: true
6357
- name: Build and test Examples with Gradle (${{matrix.gradle_args}})
6458
working-directory: ./examples/
6559
run: |

.github/workflows/ci-rootless.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ jobs:
3333
PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs &
3434
sleep 1
3535
DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR
36+
- name: Setup Gradle Build Action
37+
uses: gradle/gradle-build-action@v2
3638
- name: Build with Gradle
3739
run: ./gradlew --no-daemon --scan testcontainers:test --tests '*GenericContainerRuleTest'

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ jobs:
2424
with:
2525
java-version: '8.0.302'
2626
distribution: temurin
27-
- name: Cache Gradle Home files
28-
uses: actions/[email protected]
29-
with:
30-
path: ~/.gradle/caches
31-
key: ${{ runner.os }}-gradle-home-testmatrix-${{ hashFiles('**/*.gradle') }}
27+
- name: Setup Gradle Build Action
28+
uses: gradle/gradle-build-action@v2
3229
- id: set-matrix
3330
env:
3431
# Since we override the tests executor,
@@ -50,14 +47,16 @@ jobs:
5047
with:
5148
java-version: '8.0.302'
5249
distribution: temurin
53-
- name: Cache Gradle Home files
54-
uses: actions/[email protected]
55-
continue-on-error: true
56-
with:
57-
path: ~/.gradle/caches
58-
key: ${{ runner.os }}-gradle-home-${{matrix.gradle_args}}_check-${{ hashFiles('**/*.gradle') }}
5950
- name: Clear existing docker image cache
6051
run: docker image prune -af
52+
- name: Setup Gradle Build Action
53+
uses: gradle/gradle-build-action@v2
54+
with:
55+
gradle-home-cache-includes: |
56+
caches
57+
notifications
58+
jdks
59+
gradle-home-cache-cleanup: true
6160
- name: Build and test with Gradle (${{matrix.gradle_args}})
6261
run: |
6362
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- name: Clear existing docker image cache
2424
run: docker image prune -af
2525

26+
- name: Setup Gradle Build Action
27+
uses: gradle/gradle-build-action@v2
28+
2629
- name: Run Gradle Build
2730
run: ./gradlew build --scan --no-daemon -i -x test
2831

0 commit comments

Comments
 (0)