mirror of
https://github.com/actions/cache.git
synced 2025-03-14 04:07:00 +00:00
Update Scala - SBT example to include Coursier cache
This commit is contained in:
parent
b8204782bb
commit
393e74a534
1 changed files with 58 additions and 3 deletions
61
examples.md
61
examples.md
|
@ -437,13 +437,68 @@ When dependencies are installed later in the workflow, we must specify the same
|
|||
|
||||
## Scala - SBT
|
||||
|
||||
SBT 1.2
|
||||
```yaml
|
||||
- name: Cache SBT ivy cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.ivy2/cache
|
||||
~/.sbt
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
```
|
||||
|
||||
SBT 1.3.0-1.3.10
|
||||
```yaml
|
||||
- name: Cache SBT ivy cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Cache SBT coursier cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.coursier/cache
|
||||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
```
|
||||
|
||||
SBT 1.3.11+
|
||||
```yaml
|
||||
- name: Cache SBT ivy cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ivy2/cache
|
||||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
|
||||
- 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') }}
|
||||
- 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') }}
|
||||
- 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') }}
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue