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') }}