build: uses setup-go@v3 to simplify cache config

This updates to setup-go@v3 which is the only updated version (v2 last
updated in feb), and employs its cache to simplify workflow
configuration.

Notably, we can't do this for Alpine until #3146

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Adrian Cole
2022-09-09 08:14:58 +08:00
committed by Ron Evans
parent 617c7586fe
commit bba0dc9575
3 changed files with 22 additions and 49 deletions
+4 -10
View File
@@ -15,10 +15,6 @@ jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- uses: brechtm/setup-scoop@v2
with:
scoop_update: 'false'
@@ -30,13 +26,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Go
uses: actions/cache@v3
- name: Install Go
uses: actions/setup-go@v3
with:
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
path: |
~/AppData/Local/go-build
~/go/pkg/mod
go-version: '1.18.1'
cache: true
- name: Cache LLVM source
uses: actions/cache@v3
id: cache-llvm-source