Skip to content

Commit 0f8e3d2

Browse files
authored
🌱 Use upstream setup-go action. (#1627)
* 🌱 Use upstream setup-go action. Our way created several thousand lines like this: > Error: /usr/bin/tar: ../../../go/pkg/mod/....: Cannot open: File exists The current version of the setup-go action uses caching, so there is no more a need for our custom action.
1 parent 38f2938 commit 0f8e3d2

File tree

7 files changed

+27
-50
lines changed

7 files changed

+27
-50
lines changed

.github/actions/e2e/action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,22 @@ inputs:
2222
runs:
2323
using: "composite"
2424
steps:
25-
- uses: ./.github/actions/setup-go
25+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
26+
2627
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
2728
with:
2829
path: hack/tools/bin
2930
key: ${{ runner.os }}-tools-bin-e2e-${{ hashFiles('Makefile') }}
3031
restore-keys: |
3132
${{ runner.os }}-tools-bin-e2e-
3233
${{ runner.os }}-tools-bin-
34+
3335
- name: Download artifact
3436
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4
3537
with:
3638
name: test-release
3739
path: out
40+
3841
- name: Install hcloud
3942
shell: bash
4043
env:
@@ -72,6 +75,7 @@ runs:
7275
SKIP_IMAGE_BUILD: "1"
7376
CAPH_LATEST_VERSION: "v1.0.1"
7477
run: make ${{ inputs.e2e_make_target }}
78+
7579
- name: Upload artifact
7680
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
7781
if: ${{ !cancelled() }}

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

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/actions/test-release/action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ description: "Testing Release"
33
runs:
44
using: "composite"
55
steps:
6-
- uses: ./.github/actions/setup-go
6+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
7+
78
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
89
with:
910
path: hack/tools/bin
@@ -24,6 +25,7 @@ runs:
2425
env:
2526
TAG: ${{ steps.meta.outputs.version }}
2627
run: make test-release
28+
2729
- name: Upload artifact
2830
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
2931
if: ${{ !cancelled() }}

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ jobs:
3131
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3232
with:
3333
fetch-depth: 0
34-
- uses: ./.github/actions/setup-go
34+
35+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
36+
3537
- name: Set up QEMU
3638
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
39+
3740
- name: Set up Docker Buildx
3841
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
3942

.github/workflows/release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ jobs:
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2323
with:
2424
fetch-depth: 0
25-
- uses: ./.github/actions/setup-go
25+
26+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
27+
2628
- name: Set up QEMU
2729
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
30+
2831
- name: Set up Docker Buildx
2932
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
3033

@@ -128,25 +131,26 @@ jobs:
128131
steps:
129132
- name: Set env
130133
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
134+
131135
- name: checkout code
132136
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
133137
with:
134138
fetch-depth: 0
135-
- name: Install go
136-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
137-
with:
138-
go-version-file: "go.mod"
139-
cache: true
140-
cache-dependency-path: go.sum
139+
140+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
141+
141142
- name: install kustomize
142143
run: |
143144
make kustomize
145+
144146
- name: generate release artifacts
145147
run: |
146148
make release
149+
147150
- name: generate release notes
148151
run: |
149152
make release-notes
153+
150154
- name: Release
151155
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
152156
with:

.github/workflows/report-bin-size.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,13 @@ jobs:
1010
steps:
1111
- name: Checkout repository
1212
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
1314
- name: Fixup git permissions
1415
# https://github.com/actions/checkout/issues/766
1516
shell: bash
1617
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
1718

18-
- name: Install go
19-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
20-
with:
21-
go-version-file: "go.mod"
22-
cache: true
23-
cache-dependency-path: go.sum
19+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2420

2521
- name: Create Binsize Report
2622
run: make caph report-binsize-treemap-all

.github/workflows/test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
3233
- name: Coverage result name
3334
id: name
3435
run: |
@@ -39,10 +40,7 @@ jobs:
3940
fi
4041
echo name=${NAME} >> $GITHUB_OUTPUT
4142
42-
- name: Install go
43-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
44-
with:
45-
go-version-file: "go.mod"
43+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
4644

4745
- name: Install dependencies
4846
run: make gotestsum go-cover-treemap setup-envtest

0 commit comments

Comments
 (0)