From 13e2c1f98466426c38c1490b68d08c6fdc149b82 Mon Sep 17 00:00:00 2001 From: Denis Isaev Date: Tue, 5 May 2020 17:17:09 +0300 Subject: [PATCH] fix go.mod hashsum --- dist/post_run/index.js | 2 +- dist/run/index.js | 2 +- go.mod | 3 +++ src/cache.ts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 go.mod diff --git a/dist/post_run/index.js b/dist/post_run/index.js index 20a5360..ab74a49 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -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`; diff --git a/dist/run/index.js b/dist/run/index.js index 63ce273..d6fbb4f 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -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`; diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e591614 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/golangci/golangci-lint-action + +go 1.14 diff --git a/src/cache.ts b/src/cache.ts index 4061c8e..4c6cbf0 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -42,7 +42,7 @@ async function buildCacheKeys(): Promise { 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` }