Skip to content

Commit 977a01f

Browse files
authored
Merge pull request #8 from golangci/fix-go.mod-hash
fix go.mod hashsum
2 parents afc07fb + 13e2c1f commit 977a01f

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

dist/post_run/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27904,7 +27904,7 @@ function buildCacheKeys() {
2790427904
keys.push(cacheKey);
2790527905
if (yield pathExists(`go.mod`)) {
2790627906
// Add checksum to key to invalidate a cache when dependencies change.
27907-
cacheKey += yield checksumFile(`cache-key`, `go.mod`);
27907+
cacheKey += yield checksumFile(`sha1`, `go.mod`);
2790827908
}
2790927909
else {
2791027910
cacheKey += `nogomod`;

dist/run/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27916,7 +27916,7 @@ function buildCacheKeys() {
2791627916
keys.push(cacheKey);
2791727917
if (yield pathExists(`go.mod`)) {
2791827918
// Add checksum to key to invalidate a cache when dependencies change.
27919-
cacheKey += yield checksumFile(`cache-key`, `go.mod`);
27919+
cacheKey += yield checksumFile(`sha1`, `go.mod`);
2792027920
}
2792127921
else {
2792227922
cacheKey += `nogomod`;

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/golangci/golangci-lint-action
2+
3+
go 1.14

src/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function buildCacheKeys(): Promise<string[]> {
4242

4343
if (await pathExists(`go.mod`)) {
4444
// Add checksum to key to invalidate a cache when dependencies change.
45-
cacheKey += await checksumFile(`cache-key`, `go.mod`)
45+
cacheKey += await checksumFile(`sha1`, `go.mod`)
4646
} else {
4747
cacheKey += `nogomod`
4848
}

0 commit comments

Comments
 (0)