1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2024-09-19 09:26:43 +00:00

examples: hash go.mod, not go.sum

go.sum isn't a lock file and doesn't represent dependencies
This commit is contained in:
Peter Bourgon 2024-05-10 06:02:48 +02:00 committed by GitHub
parent 0c45773b62
commit 044254044b
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -190,7 +190,7 @@ steps:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-go-
```
@ -203,7 +203,7 @@ steps:
path: |
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-go-
```
@ -216,7 +216,7 @@ steps:
path: |
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-go-
```