From 1ddd94acf4af367ed78dd190800c2adbad9b44fa Mon Sep 17 00:00:00 2001 From: Christofer Ohlsson Date: Mon, 3 Aug 2026 11:44:25 +0200 Subject: [PATCH] Adding the option to cache in the linter workflow. Defaulting to false. --- .github/workflows/go-lint-workflow.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-lint-workflow.yaml b/.github/workflows/go-lint-workflow.yaml index bd173af..2f274cf 100644 --- a/.github/workflows/go-lint-workflow.yaml +++ b/.github/workflows/go-lint-workflow.yaml @@ -45,6 +45,10 @@ on: type: string required: false default: "lint-config" + cache: + type: boolean + required: false + default: false jobs: lint: @@ -76,21 +80,21 @@ jobs: uses: actions/setup-go@v6 with: go-version: ${{ inputs.go-version }} - cache: false + cache: ${{ inputs.cache }} - name: Setup Go (provided only go-version-file input) if: "${{ inputs.go-version == '' && inputs.go-version-file != '' }}" uses: actions/setup-go@v6 with: go-version-file: ${{ inputs.go-version-file }} - cache: false + cache: ${{ inputs.cache }} - name: Setup Go (provided neither go-version-file nor go-version input) if: "${{ inputs.go-version == '' && inputs.go-version-file == '' }}" uses: actions/setup-go@v6 with: go-version: "stable" - cache: false + cache: ${{ inputs.cache }} - name: golangci-lint id: runlint