Skip to content

Commit 29e9b80

Browse files
committed
Manage Go cache if install-go is true
1 parent f64a268 commit 29e9b80

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

action.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ inputs:
4444
runs:
4545
using: "composite"
4646
steps:
47+
- id: install_go
48+
if: ${{ inputs.install-go != 'false' }}
49+
uses: WillAbides/setup-go-faster@v1.7.0
50+
with:
51+
go-version: "1.17.x"
4752
- uses: actions/cache@v2
4853
with:
4954
path: |
5055
${{ runner.temp }}/staticcheck
56+
${{ inputs.install-go != 'false' && steps.install_go.outputs.GOCACHE || '' }}
5157
# use a unique cache key for storing, then restore from the newest cache entry we can.
5258
key: staticcheck-${{ runner.os }}-${{ inputs.cache-key }}-${{ github.sha }}
5359
restore-keys: |
5460
staticcheck-${{ runner.os }}-${{ inputs.cache-key }}-
55-
- if: ${{ inputs.install-go != 'false' }}
56-
uses: WillAbides/setup-go-faster@v1.7.0
57-
with:
58-
go-version: "1.17.x"
5961
- env:
6062
version: ${{ inputs.version }}
6163
buildTags: ${{ inputs.build-tags }}

0 commit comments

Comments
 (0)