File tree 1 file changed +8
-4
lines changed
.github/actions/setup_go_with_cache
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 51
51
working-directory : ${{ inputs.working-directory }}
52
52
- id : base-key
53
53
run : |
54
- echo "gomodcache-key=go-modcache-${{ inputs.working-directory } }" >> $GITHUB_OUTPUT
55
- echo "gocache-key=go-cache-${{ inputs.working-directory }} -${{ inputs.runs-on }} -${{ inputs.additional-gocache-key } }" >> $GITHUB_OUTPUT
54
+ echo "gomodcache-key=go-modcache-${WORKING_DIRECTORY }" >> $GITHUB_OUTPUT
55
+ echo "gocache-key=go-cache-${WORKING_DIRECTORY} -${RUNS_ON} -${ADDITIONAL_GOCACHE_KEY}-${GO_VERSION }" >> $GITHUB_OUTPUT
56
56
shell : bash
57
+ env :
58
+ ADDITIONAL_GOCACHE_KEY : ${{ inputs.additional-gocache-key }}
59
+ GO_VERSION : ${{ steps.setup-go.outputs.go-version }}
60
+ RUNS_ON : ${{ inputs.runs-on }}
61
+ WORKING_DIRECTORY : ${{ inputs.working-directory }}
57
62
- name : Cache go modules
58
63
uses : actions/cache@v4
59
64
with :
67
72
uses : actions/cache@v4
68
73
with :
69
74
path : ${{ steps.go-env.outputs.GOCACHE }}
70
- key : ${{ steps.base-key.outputs.gocache-key }}-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles(steps.go-env.outputs.GOSUM) }}
75
+ key : ${{ steps.base-key.outputs.gocache-key }}-${{ hashFiles(steps.go-env.outputs.GOSUM) }}
71
76
restore-keys : |
72
- ${{ steps.base-key.outputs.gocache-key }}-${{ steps.setup-go.outputs.go-version }}-
73
77
${{ steps.base-key.outputs.gocache-key }}-
74
78
- name : Download dependencies
75
79
if : inputs.ignore-go-mod-and-go-sum != 'true'
You can’t perform that action at this time.
0 commit comments