diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index eab39828bf..703964f6c3 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -42,7 +42,7 @@ runs: # rebuilds and cause test runs to skip tests that have no reason to rerun. # Don't run this for protected branches like master/main. - uses: actions/cache@v2 - if: github.ref_protected || github.ref != 'refs/heads/master' + if: (!github.ref_protected) && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' with: path: ~/.cache/go-build key: ${{ env.PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }}