From c1b157fbc056be0c3b3f5b10aef94aeed40a426a Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 22 Aug 2024 13:47:29 +0200 Subject: [PATCH] fix(gha): prevent runnder from traversing entire repository We have seen issues where the runner does not have permissions to enter a certain directory. Then the post-step of the cache will fail in GHA. --- actions/setup/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/setup/action.yml b/actions/setup/action.yml index bee6b790..50ee1730 100644 --- a/actions/setup/action.yml +++ b/actions/setup/action.yml @@ -58,6 +58,6 @@ runs: /home/runner/.cache/go-build /home/runner/go/pkg/mod /home/runner/go/bin - key: ${{ runner.os }}-${{ github.ref_name }}-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-${{ github.ref_name }}-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('*/go.sum') }} restore-keys: | - ${{ runner.os }}-${{ github.base_ref }}-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }} + ${{ runner.os }}-${{ github.base_ref }}-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('*/go.sum') }}