👷 Cache Go Dependencies in GHA
This commit is contained in:
parent
d26339b6a4
commit
b06184c34e
2 changed files with 30 additions and 0 deletions
20
.github/workflows/integration.yaml
vendored
20
.github/workflows/integration.yaml
vendored
|
@ -18,6 +18,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.17.x'
|
go-version: '1.17.x'
|
||||||
|
|
||||||
|
- name: Cache Go Dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Vet
|
- name: Vet
|
||||||
run: go vet
|
run: go vet
|
||||||
|
|
||||||
|
@ -37,6 +47,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.17.x'
|
go-version: '1.17.x'
|
||||||
|
|
||||||
|
- name: Cache Go Dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build ./...
|
run: go build ./...
|
||||||
|
|
||||||
|
|
10
.github/workflows/release.yaml
vendored
10
.github/workflows/release.yaml
vendored
|
@ -18,6 +18,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.17.x'
|
go-version: '1.17.x'
|
||||||
|
|
||||||
|
- name: Cache Go Dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v1.13.0
|
uses: docker/login-action@v1.13.0
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue