Skip to content

Commit

Permalink
use go action cache (#124)
Browse files Browse the repository at this point in the history
* use go action cache

* download first
  • Loading branch information
tg123 committed Jan 5, 2023
1 parent e14b6d3 commit 20be820
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/go.yml
Expand Up @@ -12,28 +12,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

# https://github.com/mvdan/github-actions-golang
- uses: actions/cache@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: ^1.19
cache: true
id: go

- uses: dotnet/nbgv@master
with:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/golangci-lint.yml
Expand Up @@ -15,17 +15,18 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
cache: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down

0 comments on commit 20be820

Please sign in to comment.