mirror of
https://github.com/actions/cache.git
synced 2025-03-14 12:16:59 +00:00
Added example for Python poetry
This commit is contained in:
parent
d33b5077b5
commit
299fda9efe
1 changed files with 13 additions and 1 deletions
12
examples.md
12
examples.md
|
@ -22,6 +22,7 @@
|
||||||
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow)
|
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow)
|
||||||
- [Using pip to get cache location](#using-pip-to-get-cache-location)
|
- [Using pip to get cache location](#using-pip-to-get-cache-location)
|
||||||
- [Using a script to get cache location](#using-a-script-to-get-cache-location)
|
- [Using a script to get cache location](#using-a-script-to-get-cache-location)
|
||||||
|
- [Python - poetry](#python---poetry)
|
||||||
- [R - renv](#r---renv)
|
- [R - renv](#r---renv)
|
||||||
- [Simple example](#simple-example-1)
|
- [Simple example](#simple-example-1)
|
||||||
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow-1)
|
- [Multiple OSes in a workflow](#multiple-oss-in-a-workflow-1)
|
||||||
|
@ -379,6 +380,17 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Python - poetry
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pypoetry
|
||||||
|
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-poetry-
|
||||||
|
```
|
||||||
|
|
||||||
## R - renv
|
## R - renv
|
||||||
|
|
||||||
For renv, the cache directory will vary by OS. Look at https://rstudio.github.io/renv/articles/renv.html#cache
|
For renv, the cache directory will vary by OS. Look at https://rstudio.github.io/renv/articles/renv.html#cache
|
||||||
|
|
Loading…
Add table
Reference in a new issue