2023-09-27 10:24:27 +02:00
|
|
|
name: Setup caches
|
|
|
|
|
|
|
|
description: Setup caches for go modules, tools and build cache.
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
build-cache-key:
|
|
|
|
description: build cache prefix
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
2024-12-06 13:24:52 +00:00
|
|
|
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
2023-09-27 10:24:27 +02:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|
2024-12-06 13:24:52 +00:00
|
|
|
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
2023-09-27 10:24:27 +02:00
|
|
|
with:
|
|
|
|
path: ~/.cache/kyverno/tools
|
|
|
|
key: ${{ runner.os }}-cache-kyverno-tools-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|
2024-12-06 13:24:52 +00:00
|
|
|
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
2023-09-27 10:24:27 +02:00
|
|
|
if: ${{ inputs.build-cache-key }}
|
|
|
|
with:
|
|
|
|
path: ~/.cache/go-build
|
|
|
|
key: ${{ runner.os }}-build-cache-${{ inputs.build-cache-key }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|