Skip to content

Commit

Permalink
Use caching builtin setup-go action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Aug 15, 2022
1 parent 310f332 commit 28d96d7
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,15 @@ jobs:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.18
check-latest: true

- name: Checkout
uses: actions/[email protected]

- name: Cache Go modules
uses: actions/[email protected]
id: go-mod-cache
- name: Set up Go
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: go.mod
check-latest: true
cache: true

- name: Get dependencies
run: make download
Expand Down Expand Up @@ -72,11 +64,17 @@ jobs:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.18
go-version-file: ./go.mod
check-latest: true
cache: true

- name: Install cosign
uses: sigstore/[email protected]
Expand All @@ -86,11 +84,6 @@ jobs:
- name: Install Syft
uses: anchore/sbom-action/[email protected]

- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Login to Container registries
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand Down

0 comments on commit 28d96d7

Please sign in to comment.