mirror of https://github.com/actions/cache.git
Remove build.sbt hash from SBT cache keys
SBT dependencies can be defined outside build.sbt, therefore hash of build.sbt is not reliable to determine if dependencies have changed
This commit is contained in:
parent
393e74a534
commit
856766b160
40
examples.md
40
examples.md
|
@ -443,12 +443,16 @@ SBT 1.2
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-ivy-cache-
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-
|
||||
```
|
||||
|
||||
SBT 1.3.0-1.3.10
|
||||
|
@ -457,17 +461,23 @@ SBT 1.3.0-1.3.10
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-ivy-cache-
|
||||
- name: Cache SBT coursier cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.coursier/cache
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-coursier-cache-
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-
|
||||
```
|
||||
|
||||
SBT 1.3.11+
|
||||
|
@ -476,30 +486,40 @@ SBT 1.3.11+
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-ivy-cache-
|
||||
- name: Cache SBT coursier cache (Linux)
|
||||
uses: actions/cache@v2
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
with:
|
||||
path: ~/.cache/coursier/v1
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-coursier-cache-
|
||||
- name: Cache SBT coursier cache (macOS)
|
||||
uses: actions/cache@v2
|
||||
if: startsWith(runner.os, 'macOS')
|
||||
with:
|
||||
path: ~/Library/Caches/Coursier/v1
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-coursier-cache-
|
||||
- name: Cache SBT coursier cache (Windows)
|
||||
uses: actions/cache@v2
|
||||
if: startsWith(runner.os, 'Windows')
|
||||
with:
|
||||
path: ~\AppData\Local\Coursier\Cache\v1
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-coursier-cache-
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
key: ${{ runner.os }}-sbt-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-sbt-
|
||||
```
|
||||
|
||||
## Swift, Objective-C - Carthage
|
||||
|
|
Loading…
Reference in New Issue