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/setup-go@v3.2.1
with:
go-version: 1.18
check-latest: true

- name: Checkout
uses: actions/checkout@v3.0.2

- name: Cache Go modules
uses: actions/cache@v3.0.6
id: go-mod-cache
- name: Set up Go
uses: actions/setup-go@v3.2.1
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/checkout@v3.0.2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3.2.1
with:
go-version: 1.18
go-version-file: ./go.mod
check-latest: true
cache: true

- name: Install cosign
uses: sigstore/cosign-installer@v2.5.0
Expand All @@ -86,11 +84,6 @@ jobs:
- name: Install Syft
uses: anchore/sbom-action/download-syft@v0.11.0

- name: Checkout
uses: actions/checkout@v3.0.2
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.