mirror of https://github.com/databricks/cli.git
Use actions/setup-go@v3 with caching support (#41)
This commit is contained in:
parent
2e12a2aa01
commit
d214f44df4
|
@ -20,21 +20,10 @@ jobs:
|
||||||
run: git fetch --prune --unshallow
|
run: git fetch --prune --unshallow
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.18.x
|
go-version: 1.18.x
|
||||||
|
cache: true
|
||||||
- name: Cache packages
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/go/pkg/mod
|
|
||||||
~/.cache/go-build
|
|
||||||
/opt/hostedtoolcache/go
|
|
||||||
vendor
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
|
|
||||||
- name: Set go env
|
- name: Set go env
|
||||||
run: |
|
run: |
|
||||||
|
@ -53,12 +42,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions/setup-go@v1
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.18.x
|
go-version: 1.18.x
|
||||||
|
|
||||||
|
# No need to download cached dependencies when running gofmt.
|
||||||
|
cache: false
|
||||||
|
|
||||||
- name: Run gofmt
|
- name: Run gofmt
|
||||||
run: |
|
run: |
|
||||||
# -l: list files that were reformatted
|
# -l: list files that were reformatted
|
||||||
|
|
|
@ -12,9 +12,10 @@ jobs:
|
||||||
- name: Unshallow
|
- name: Unshallow
|
||||||
run: git fetch --prune --unshallow
|
run: git fetch --prune --unshallow
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
|
cache: true
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: hashicorp/ghaction-import-gpg@v2.1.0
|
uses: hashicorp/ghaction-import-gpg@v2.1.0
|
||||||
|
|
Loading…
Reference in New Issue