workflows: update setup-go to v3
Use built-in cache, simplify steps.
This commit is contained in:
parent
7dd21bc7e4
commit
cbf6a2940f
2 changed files with 8 additions and 22 deletions
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -54,15 +54,10 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Restore Go modules from cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/go/pkg/mod
|
||||
key: deps-${{ hashFiles('go.sum') }}
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
run: go mod download -json
|
||||
|
@ -135,9 +130,10 @@ jobs:
|
|||
|
||||
# For proper `deps` make target execution.
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
cache: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
|
|
18
.github/workflows/run_tests.yml
vendored
18
.github/workflows/run_tests.yml
vendored
|
@ -101,15 +101,10 @@ jobs:
|
|||
git submodule update --init
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Restore Go modules from cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/go/pkg/mod
|
||||
key: deps-${{ hashFiles('go.sum') }}
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
run: go mod download -json
|
||||
|
@ -151,15 +146,10 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '${{ matrix.go_versions }}'
|
||||
|
||||
- name: Restore Go modules from cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/go/pkg/mod
|
||||
key: deps-${{ hashFiles('go.sum') }}
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
run: go mod download -json
|
||||
|
|
Loading…
Reference in a new issue