Skip to content

Commit 1ddd94a

Browse files
committed
Adding the option to cache in the linter workflow. Defaulting to false.
1 parent 9c628f8 commit 1ddd94a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/go-lint-workflow.yaml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ on:
4545
type: string
4646
required: false
4747
default: "lint-config"
48+
cache:
49+
type: boolean
50+
required: false
51+
default: false
4852

4953
jobs:
5054
lint:
@@ -76,21 +80,21 @@ jobs:
7680
uses: actions/setup-go@v6
7781
with:
7882
go-version: ${{ inputs.go-version }}
79-
cache: false
83+
cache: ${{ inputs.cache }}
8084

8185
- name: Setup Go (provided only go-version-file input)
8286
if: "${{ inputs.go-version == '' && inputs.go-version-file != '' }}"
8387
uses: actions/setup-go@v6
8488
with:
8589
go-version-file: ${{ inputs.go-version-file }}
86-
cache: false
90+
cache: ${{ inputs.cache }}
8791

8892
- name: Setup Go (provided neither go-version-file nor go-version input)
8993
if: "${{ inputs.go-version == '' && inputs.go-version-file == '' }}"
9094
uses: actions/setup-go@v6
9195
with:
9296
go-version: "stable"
93-
cache: false
97+
cache: ${{ inputs.cache }}
9498

9599
- name: golangci-lint
96100
id: runlint

0 commit comments

Comments
 (0)