Skip to content

Commit

Permalink
cache on go.mod as well as go.sum
Browse files Browse the repository at this point in the history
  • Loading branch information
roothorp committed Mar 12, 2024
1 parent 4b22df4 commit 07fefcb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-push-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}
- name: Download go build dependencies
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}

- name: Setup Go
uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-released-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}
- name: Download go build dependencies
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-full-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-full-${{ hashFiles('**/go.sum', '**/go.mod') }}
- name: Get go dependencies if cache is missed
if: steps.cache-go.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-full-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-full-${{ hashFiles('**/go.sum', '**/go.mod') }}
- name: Get go dependencies if cache is missed
if: steps.get-go-deps.outputs.cache-hit != 'true'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-int.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}
- name: Setup Go
uses: actions/setup-go@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}

- name: Setup Go
uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum', '**/go.mod') }}

- name: Setup Go
uses: actions/setup-go@v5
Expand Down

0 comments on commit 07fefcb

Please sign in to comment.