Skip to content

Commit

Permalink
Merge pull request #33 from systemli/cache-go-dependencies
Browse files Browse the repository at this point in the history
👷 Cache Go Dependencies in GHA
  • Loading branch information
0x46616c6b authored Feb 26, 2022
2 parents f4ba59c + 2a0bbd3 commit 0d13edf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ jobs:
with:
go-version: '1.17.x'

- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Vet
run: go vet

Expand All @@ -39,6 +49,16 @@ jobs:
with:
go-version: '1.17.x'

- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build .

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ jobs:
with:
go-version: '1.17.x'

- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Login to Docker Hub
uses: docker/[email protected]
with:
Expand Down

0 comments on commit 0d13edf

Please sign in to comment.