Skip to content

Commit db237e3

Browse files
committed
ci: use linter cache
Signed-off-by: Francesco Canovai <[email protected]>
1 parent e47b26b commit db237e3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,25 @@ jobs:
4545
DAGGER_VERSION: 0.14.0
4646
run: |
4747
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
48+
- name: Modules cache
49+
id: restore-modules
50+
uses: actions/cache@v4
51+
with:
52+
path: |
53+
~/.cache/go-build
54+
~/go/pkg/mod
55+
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
56+
restore-keys: |
57+
${{ runner.os }}-go-modules-
58+
- name: Linter cache
59+
id: restore-linter
60+
uses: actions/cache@v4
61+
with:
62+
path: |
63+
~/.cache/golangci-lint
64+
key: ${{ runner.os }}-go-linter
65+
restore-keys: |
66+
${{ runner.os }}-go-linter
4867
- name: Run CI task
4968
run: |
5069
task ci

Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tasks:
1616
cmds:
1717
- >
1818
GITHUB_REF= dagger -s call -m github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA}
19+
with-linter-cache --cache golangci-lint --source ~/.cache/golangci-lint
1920
run --source . --config .golangci.yml stdout
2021
sources:
2122
- ./**/*.go

0 commit comments

Comments
 (0)