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 changedpull/338/head
parent
393e74a534
commit
856766b160
40
examples.md
40
examples.md
|
@ -443,12 +443,16 @@ SBT 1.2
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.ivy2/cache
|
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
|
- name: Cache SBT
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.sbt
|
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
|
SBT 1.3.0-1.3.10
|
||||||
|
@ -457,17 +461,23 @@ SBT 1.3.0-1.3.10
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.ivy2/cache
|
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
|
- name: Cache SBT coursier cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.coursier/cache
|
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
|
- name: Cache SBT
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.sbt
|
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+
|
SBT 1.3.11+
|
||||||
|
@ -476,30 +486,40 @@ SBT 1.3.11+
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.ivy2/cache
|
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)
|
- name: Cache SBT coursier cache (Linux)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'Linux')
|
if: startsWith(runner.os, 'Linux')
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/coursier/v1
|
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)
|
- name: Cache SBT coursier cache (macOS)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'macOS')
|
if: startsWith(runner.os, 'macOS')
|
||||||
with:
|
with:
|
||||||
path: ~/Library/Caches/Coursier/v1
|
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)
|
- name: Cache SBT coursier cache (Windows)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'Windows')
|
if: startsWith(runner.os, 'Windows')
|
||||||
with:
|
with:
|
||||||
path: ~\AppData\Local\Coursier\Cache\v1
|
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
|
- name: Cache SBT
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.sbt
|
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
|
## Swift, Objective-C - Carthage
|
||||||
|
|
Loading…
Reference in New Issue