Skip to content

Commit

Permalink
Temporarily test file removal
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 19, 2024
1 parent f3fd9fb commit 6a725f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
echo 'KEY_PREFIX=${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{ inputs.go-version }}-matrix(${{ join(matrix.*,'|') }})' >> $GITHUB_OUTPUT
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
if [ ${{ runner.os }} != 'Windows' ]; then echo SUDO='sudo' >> $GITHUB_OUTPUT; fi
id: variables

# Cache the Go Modules downloaded during the job.
Expand All @@ -42,12 +43,11 @@ runs:
path: ${{ steps.variables.outputs.GOCACHE }}
key: ${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }}
restore-keys: |
${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}-
${{ steps.variables.outputs.KEY_PREFIX }}-go-build-
${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}-
${{ steps.variables.outputs.KEY_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 -rf ${{ steps.variables.outputs.GOMODCACHE }} ${{ steps.variables.outputs.KEY_PREFIX }}
- shell: bash
run: ${{ steps.variables.outputs.SUDO }} rm -rf ${{ steps.variables.outputs.GOMODCACHE }} ${{ steps.variables.outputs.GOCACHE }}

0 comments on commit 6a725f6

Please sign in to comment.