Skip to content

Commit 0a22bc7

Browse files
committed
GitHub: remove caching, already built in
The actions/setup-go@v5 already includes Go module caching by default. We no longer need to add our custom caching.
1 parent 33bc532 commit 0a22bc7

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

.github/actions/setup-go/action.yml

-37
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ inputs:
77
key-prefix:
88
description: "A prefix to use for the cache key, to separate cache entries from other workflows"
99
required: false
10-
use-build-cache:
11-
description: "Whether to use the build cache"
12-
required: false
13-
# Boolean values aren't supported in the workflow syntax, so we use a
14-
# string. To not confuse the value with true/false, we use 'yes' and 'no'.
15-
default: 'yes'
1610

1711
runs:
1812
using: "composite"
@@ -29,37 +23,6 @@ runs:
2923
with:
3024
go-version: '${{ inputs.go-version }}'
3125

32-
- name: go module and build cache
33-
if: ${{ inputs.use-build-cache == 'yes' }}
34-
uses: actions/cache@v4
35-
with:
36-
# In order:
37-
# * Module download cache
38-
# * Build cache (Linux)
39-
# * Build cache (Mac)
40-
# * Build cache (Windows)
41-
path: |
42-
~/go/pkg/mod
43-
~/.cache/go-build
44-
~/Library/Caches/go-build
45-
~\AppData\Local\go-build
46-
key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
47-
restore-keys: |
48-
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-${{ github.job }}-
49-
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-
50-
51-
- name: go module cache
52-
if: ${{ inputs.use-build-cache == 'no' }}
53-
uses: actions/cache@v4
54-
with:
55-
# Just the module download cache.
56-
path: |
57-
~/go/pkg/mod
58-
key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-no-build-cache-${{ github.job }}-${{ hashFiles('**/go.sum') }}
59-
restore-keys: |
60-
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-no-build-cache-${{ github.job }}-
61-
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-no-build-cache-
62-
6326
- name: set GOPATH
6427
shell: bash
6528
run: |

.github/workflows/main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ jobs:
125125
uses: ./.github/actions/setup-go
126126
with:
127127
go-version: '${{ env.GO_VERSION }}'
128-
key-prefix: cross-compile
129-
use-build-cache: 'no'
130128

131129
- name: build release for all architectures (skip app build)
132130
run: make go-release sys="${{ matrix.sys }}"

0 commit comments

Comments
 (0)