From 5ffd6c640b1c23593321994475e6bed90df1139a Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Sat, 12 Mar 2022 12:00:54 +0100 Subject: [PATCH 1/2] More go-setup github action fixes --- .github/actions/setup-go/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index 74286ec2aa..48cf3a8504 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -46,11 +46,11 @@ runs: key: ${{ env.PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }} restore-keys: | ${{ env.PREFIX }}-go-build-${{ github.ref }}- - ${{ env.PREFIX }}-go-build-master- + ${{ env.PREFIX }}-go-build-refs/heads/master- ${{ env.PREFIX }}-go-build- # Reset the cache for master/protected branches, to ensure they build and run the tests from zero # and that the module cache is cleaned (otherwise it accumulates orphan dependencies over time). - if: github.ref_protected shell: bash - run: sudo rm -r ~/.cache/go-build ~/go/pkg/mod + run: sudo rm -rf ~/.cache/go-build ~/go/pkg/mod From d9d3e586a3118d50062d25e68715d657803ab94b Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 14 Mar 2022 02:30:54 +0100 Subject: [PATCH 2/2] Address review feedback --- .github/actions/setup-go/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index 48cf3a8504..1bfd4a41f8 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -46,7 +46,6 @@ runs: key: ${{ env.PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }} restore-keys: | ${{ env.PREFIX }}-go-build-${{ github.ref }}- - ${{ env.PREFIX }}-go-build-refs/heads/master- ${{ env.PREFIX }}-go-build- # Reset the cache for master/protected branches, to ensure they build and run the tests from zero