Merge pull request #83 from systemli/cache-go-dependencies

👷 Cache Go Dependencies in GHA
This commit is contained in:
Dwight Donovan Benvenuto 2022-02-26 10:58:27 +01:00 committed by GitHub
commit 41db6076ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View file

@ -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: Vet
run: go vet
@ -37,6 +47,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 ./...

View file

@ -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/login-action@v1.13.0
with: