Skip to content

Commit e6dc992

Browse files
committed
feat: remove Go cache management
1 parent d6238b0 commit e6dc992

File tree

3 files changed

+2
-32
lines changed

3 files changed

+2
-32
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
# Require: The version of golangci-lint to use.
5050
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
5151
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
52-
version: v1.54
52+
version: v1.57
5353

5454
# Optional: working directory, useful for monorepos
5555
# working-directory: somedir
@@ -67,12 +67,6 @@ jobs:
6767
# takes precedence over all other caching options.
6868
# skip-cache: true
6969

70-
# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
71-
# skip-pkg-cache: true
72-
73-
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
74-
# skip-build-cache: true
75-
7670
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
7771
# install-mode: "goinstall"
7872
```

action.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ inputs:
2929
takes precedence over all other caching options.
3030
default: 'false'
3131
required: false
32-
skip-pkg-cache:
33-
description: "if set to true then the action doesn't cache or restore ~/go/pkg."
34-
default: 'false'
35-
required: false
36-
skip-build-cache:
37-
description: "if set to true then the action doesn't cache or restore ~/.cache/go-build."
38-
default: 'false'
39-
required: false
4032
install-mode:
4133
description: "The mode to install golangci-lint. It can be 'binary' or 'goinstall'."
4234
default: "binary"

src/cache.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,7 @@ const getLintCacheDir = (): string => {
2424
}
2525

2626
const getCacheDirs = (): string[] => {
27-
// Not existing dirs are ok here: it works.
28-
const skipPkgCache = core.getInput(`skip-pkg-cache`, { required: true }).trim()
29-
const skipBuildCache = core.getInput(`skip-build-cache`, { required: true }).trim()
30-
const dirs = [getLintCacheDir()]
31-
32-
if (skipBuildCache.toLowerCase() == "true") {
33-
core.info(`Omitting ~/.cache/go-build from cache directories`)
34-
} else {
35-
dirs.push(path.resolve(`${process.env.HOME}/.cache/go-build`))
36-
}
37-
if (skipPkgCache.toLowerCase() == "true") {
38-
core.info(`Omitting ~/go/pkg from cache directories`)
39-
} else {
40-
dirs.push(path.resolve(`${process.env.HOME}/go/pkg`))
41-
}
42-
43-
return dirs
27+
return [getLintCacheDir()]
4428
}
4529

4630
const getIntervalKey = (invalidationIntervalDays: number): string => {

0 commit comments

Comments
 (0)