From b766d556676310d412bd2fc114b7de78efc367e9 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 16 Aug 2024 14:10:37 +0200 Subject: [PATCH] fix: cache from branch, fallback to target branch --- actions/setup/action.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/actions/setup/action.yml b/actions/setup/action.yml index 9c00223e..35fe3762 100644 --- a/actions/setup/action.yml +++ b/actions/setup/action.yml @@ -53,10 +53,7 @@ runs: /home/runner/.cache/go-build /home/runner/go/pkg/mod /home/runner/go/bin - key: ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('**/go.sum')-${{ github.ref_name }} restore-keys: | - ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}- - ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}- - ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}- - ${{ runner.os }}-sage-${{ github.workflow }}- - ${{ runner.os }}-sage- + ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('**/go.sum')-${{ github.base_ref }} +