Merge pull request #8 from golangci/fix-go.mod-hash

fix go.mod hashsum
This commit is contained in:
Isaev Denis 2020-05-05 17:20:28 +03:00 committed by GitHub
commit 977a01f96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 3 deletions

View File

@ -27904,7 +27904,7 @@ function buildCacheKeys() {
keys.push(cacheKey);
if (yield pathExists(`go.mod`)) {
// Add checksum to key to invalidate a cache when dependencies change.
cacheKey += yield checksumFile(`cache-key`, `go.mod`);
cacheKey += yield checksumFile(`sha1`, `go.mod`);
}
else {
cacheKey += `nogomod`;

2
dist/run/index.js vendored
View File

@ -27916,7 +27916,7 @@ function buildCacheKeys() {
keys.push(cacheKey);
if (yield pathExists(`go.mod`)) {
// Add checksum to key to invalidate a cache when dependencies change.
cacheKey += yield checksumFile(`cache-key`, `go.mod`);
cacheKey += yield checksumFile(`sha1`, `go.mod`);
}
else {
cacheKey += `nogomod`;

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/golangci/golangci-lint-action
go 1.14

View File

@ -42,7 +42,7 @@ async function buildCacheKeys(): Promise<string[]> {
if (await pathExists(`go.mod`)) {
// Add checksum to key to invalidate a cache when dependencies change.
cacheKey += await checksumFile(`cache-key`, `go.mod`)
cacheKey += await checksumFile(`sha1`, `go.mod`)
} else {
cacheKey += `nogomod`
}