From 299fda9efe0045e86c2a29dcbfa9920bbb8df9c3 Mon Sep 17 00:00:00 2001
From: Mikhail Beliansky <35418634+licht1stein@users.noreply.github.com>
Date: Sun, 27 Sep 2020 21:47:17 +0300
Subject: [PATCH] Added example for Python poetry

---
 examples.md | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/examples.md b/examples.md
index c66eca6..e0681f1 100644
--- a/examples.md
+++ b/examples.md
@@ -22,6 +22,7 @@
     - [Multiple OSes in a workflow](#multiple-oss-in-a-workflow)
     - [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)
+  - [Python - poetry](#python---poetry)
   - [R - renv](#r---renv)
     - [Simple example](#simple-example-1)
     - [Multiple OSes in a workflow](#multiple-oss-in-a-workflow-1)
@@ -302,7 +303,7 @@ For pip, the cache directory will vary by OS. See https://pip.pypa.io/en/stable/
 Locations:
  - Ubuntu: `~/.cache/pip`
  - Windows: `~\AppData\Local\pip\Cache`
- - macOS: `~/Library/Caches/pip`
+ - macOS: `~/Library/Caches/pip` 
 
 ### Simple example
 ```yaml
@@ -379,6 +380,17 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu.
       ${{ 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
 
 For renv, the cache directory will vary by OS. Look at https://rstudio.github.io/renv/articles/renv.html#cache