Skip to content

Commit

Permalink
ci: unify usage of gradle setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleGreenYoda42 committed Sep 30, 2024
1 parent 518385d commit 1c27d30
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ jobs:

# Allow caching Gradle executions to further speed up CI/CD steps invoking Gradle.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
gradle-version: wrapper
cache-read-only: ${{ github.event.repository.default_branch != github.ref_name }}
dependency-graph: ${{ github.event.repository.default_branch == github.ref_name && 'generate-and-submit' || 'disabled' }}
# Cache only updated on release.
cache-read-only: true

# Check whether the project builds.
- name: Gradle Build
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:

# Allow caching Gradle executions to further speed up CI/CD steps invoking Gradle.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
gradle-version: wrapper
# Cache only updated on release.
cache-read-only: true

# Allow caching the Auto executable to speed up CI/CD steps by not re-downloading Auto.
Expand Down Expand Up @@ -162,9 +162,9 @@ jobs:

# Allow caching Gradle executions to further speed up CI/CD steps invoking Gradle.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
gradle-version: wrapper
# Cache only updated on release.
cache-read-only: true

# Setup Node for TS/JS/Node client generation.
Expand Down Expand Up @@ -278,11 +278,14 @@ jobs:

# Allow caching Gradle executions to further speed up CI/CD steps invoking Gradle.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
gradle-version: wrapper
gradle-home-cache-cleanup: true
cache-read-only: true
# Clean the gradle user dir from unused entries before writing it back to the cache.
cache-cleanup: on-success
# Update the cache entry during the release when main is updated to be used by all other jobs.
cache-read-only: false
# Push new dependency graph for changes merged to main.
dependency-graph: ${{ github.event.repository.default_branch == github.ref_name && 'generate-and-submit' || 'disabled' }}

# Setup a Node environment to allow publishing to the private GitHub NPM package repository.
- name: Setup Node
Expand Down

0 comments on commit 1c27d30

Please sign in to comment.