mirror of
https://github.com/ahmetb/kubectx.git
synced 2026-03-18 03:42:12 +00:00
add build cache to actions (#339)
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -26,6 +26,20 @@ jobs:
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- id: go-cache-paths
|
||||
run: |
|
||||
echo "::set-output name=go-build::$(go env GOCACHE)"
|
||||
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
||||
- name: Go Build Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
- name: Go Mod Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
||||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
||||
- name: Ensure gofmt
|
||||
run: test -z "$(gofmt -s -d .)"
|
||||
- name: Ensure go.mod is already tidied
|
||||
|
||||
Reference in New Issue
Block a user