Skip to content

Commit

Permalink
Use burrunan/gradle-cache-action@v instead of actions/cache@v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Jul 3, 2023
1 parent faaad57 commit b6609b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ on:
type: boolean
required: false
default: false
gradle-build-root:
type: string
required: false
default: ""

jobs:
prepare-matrix:
Expand Down Expand Up @@ -99,16 +103,10 @@ jobs:
id: coursier-cache
uses: coursier/cache-action@v6

# Inspired by https://github.com/actions/setup-java/blob/45058d7f99afcd22834b58fde7cbfb7075eb48a2/src/cache.ts#L30-L44
- name: Gradle Cache
uses: actions/cache@v3
uses: burrunan/gradle-cache-action@v1
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-
build-root-directory: ${{ inputs.gradle-build-root }}

- name: Custom Cache
uses: actions/cache@v3
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
type: string
required: false
default: "sbt ci-release"
gradle-build-root:
type: string
required: false
default: ""

jobs:
cmd:
Expand All @@ -33,16 +37,10 @@ jobs:
id: coursier-cache
uses: coursier/cache-action@v6

# Inspired by https://github.com/actions/setup-java/blob/45058d7f99afcd22834b58fde7cbfb7075eb48a2/src/cache.ts#L30-L44
- name: Gradle Cache
uses: actions/cache@v3
uses: burrunan/gradle-cache-action@v1
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-
build-root-directory: ${{ inputs.gradle-build-root }}

- name: Install Adoptium Temurin OpenJDK
uses: coursier/setup-action@v1
Expand Down

0 comments on commit b6609b2

Please sign in to comment.