Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78d877f

Browse files
committed
caching is now supported via actions/cache
1 parent 2d03017 commit 78d877f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,17 @@ jobs:
5959

6060
#### How do I set up caching between builds?
6161

62-
We haven't been able to find a simple way to accomplish this. It would be useful
63-
to persist Go's module download and build caches.
62+
Use [actions/cache](https://github.com/actions/cache). For example, to cache
63+
downloaded modules:
64+
65+
```
66+
- uses: actions/cache@v1
67+
with:
68+
path: ~/go/pkg/mod
69+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
70+
restore-keys: |
71+
${{ runner.os }}-go-
72+
```
6473

6574
#### How do I run a step conditionally?
6675

0 commit comments

Comments
 (0)