mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
* fix: cache error in gh workflows Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * setup caches Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
24 lines
924 B
YAML
24 lines
924 B
YAML
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:
|
|
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|
|
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
|
|
with:
|
|
path: ~/.cache/kyverno/tools
|
|
key: ${{ runner.os }}-cache-kyverno-tools-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|
|
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # v3.2.2
|
|
if: ${{ inputs.build-cache-key }}
|
|
with:
|
|
path: ~/.cache/go-build
|
|
key: ${{ runner.os }}-build-cache-${{ inputs.build-cache-key }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|