workflows: update setup-go to v3

Use built-in cache, simplify steps.
This commit is contained in:
Roman Khimov 2022-07-20 19:19:51 +03:00
parent 7dd21bc7e4
commit cbf6a2940f
2 changed files with 8 additions and 22 deletions

View file

@ -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

View file

@ -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