Skip to content

Commit d8abdaf

Browse files
authored
Cache tools with go version (open-telemetry#2755)
* Cache tools with go version Signed-off-by: Pavol Loffay <[email protected]> * Fix Signed-off-by: Pavol Loffay <[email protected]> --------- Signed-off-by: Pavol Loffay <[email protected]>
1 parent 34f9e5f commit d8abdaf

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/continuous-integration.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020

2121
- name: Set up Go
2222
uses: actions/setup-go@v5
23+
id: setup-go
2324
with:
2425
go-version: "~1.21.1"
2526

2627
- name: Cache tools
2728
uses: actions/cache@v4
2829
with:
2930
path: bin
30-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
31+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
3132

3233
- name: Install tools
3334
run: make install-tools
@@ -49,9 +50,10 @@ jobs:
4950

5051
- name: Cache tools
5152
uses: actions/cache@v4
53+
id: setup-go
5254
with:
5355
path: bin
54-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
56+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
5557

5658
- name: Install tools
5759
run: make install-tools

.github/workflows/e2e.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ jobs:
4444
uses: actions/checkout@v4
4545
- name: Set up Go
4646
uses: actions/setup-go@v5
47+
id: setup-go
4748
with:
4849
go-version: "~1.21.3"
4950
- name: Cache tools
5051
uses: actions/cache@v4
5152
with:
5253
path: bin
53-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
54+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
5455
- name: Install chainsaw
5556
uses: kyverno/[email protected]
5657
- name: Install tools

.github/workflows/scorecard.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424

2525
- name: Set up Go
2626
uses: actions/setup-go@v5
27+
id: setup-go
2728
with:
2829
go-version: "~1.21.1"
2930

@@ -34,7 +35,7 @@ jobs:
3435
uses: actions/cache@v4
3536
with:
3637
path: bin
37-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
38+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
3839

3940
- name: Install tools
4041
run: make install-tools

0 commit comments

Comments
 (0)