Skip to content

Commit c168294

Browse files
Merge pull request #483 from furkatgofurov7/remove-unneccesary-archs
feat: Improvements to make image buildings faster
2 parents fda4dd3 + e200841 commit c168294

13 files changed

Lines changed: 14 additions & 27 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Features to add to the dev container. More info: https://containers.dev/features.
88
"features": {
99
"ghcr.io/devcontainers/features/go:1": {
10-
"version": "1.21"
10+
"version": "1.22"
1111
},
1212
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
1313
"ghcr.io/mpriscella/features/kind:1": {},

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: actions/setup-go@v5
1212
with:
13-
go-version: '1.21'
13+
go-version: '1.22'
1414
check-latest: true
1515
cache: true
1616
- name: Verify

.github/workflows/e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install Go
3232
uses: actions/setup-go@v5
3333
with:
34-
go-version: 1.21.x
34+
go-version: 1.22.x
3535
- name: Build e2e image
3636
run: make e2e-image
3737
- uses: actions/cache@v4.1.1

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install Go
3535
uses: actions/setup-go@v5
3636
with:
37-
go-version: 1.21.x
37+
go-version: 1.22.x
3838
- name: Setup kind
3939
uses: helm/kind-action@v1.10.0
4040
with:

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.21.8
22+
go-version: 1.22.8
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v6.1.1
2525
with:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.21.8
18+
go-version: 1.22.8
1919
- name: Lint
2020
run: make lint

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: setupGo
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version: '=1.21.8'
28+
go-version: '=1.22.8'
2929
- name: Docker login ghcr.io
3030
uses: docker/login-action@v3
3131
with:
@@ -62,7 +62,7 @@ jobs:
6262
- name: setupGo
6363
uses: actions/setup-go@v5
6464
with:
65-
go-version: '=1.21.8'
65+
go-version: '=1.22.8'
6666
- name: Update manifests
6767
run: |
6868
make release RELEASE_TAG=${{ env.TAG }} REGISTRY=${{ env.GHCR_REGISTRY }}

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Options for analysis running.
22
run:
3-
go: "1.21"
3+
go: "1.22"
44
skip-files:
55
- "zz_generated.*\\.go$"
66
- "conversion\\.go"

Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ ARG goproxy=https://proxy.golang.org
1616
# Run this with docker build --build-arg package=./controlplane or --build-arg package=./bootstrap
1717
ENV GOPROXY=$goproxy
1818

19-
# Copy the Go Modules manifests
20-
COPY go.mod go.mod
21-
COPY go.sum go.sum
22-
23-
# Cache deps before building and copying source so that we don't need to re-download as much
24-
# and so that source changes don't invalidate our downloaded layer
25-
RUN --mount=type=cache,target=/go/pkg/mod \
26-
go mod download
27-
2819
# Copy the sources
2920
COPY ./ ./
3021

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SHELL = /usr/bin/env bash -o pipefail
1313
#
1414
# Go.
1515
#
16-
GO_VERSION ?= 1.22.0
16+
GO_VERSION ?= 1.22.8
1717
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
1818

1919
# Use GOPROXY environment variable if set
@@ -113,8 +113,8 @@ GH := $(abspath $(TOOLS_BIN_DIR)/$(GH_BIN))
113113
# Registry / images
114114
TAG ?= dev
115115
ARCH ?= $(shell go env GOARCH)
116-
ALL_ARCH = amd64 arm arm64 ppc64le s390x
117-
TARGET_PLATFORMS := linux/amd64,linux/arm64,linux/arm,linux/ppc64le,linux/s390x
116+
ALL_ARCH = amd64 arm64
117+
TARGET_PLATFORMS := linux/amd64,linux/arm64
118118
MACHINE := cluster-api-provider-rke2
119119
REGISTRY ?= ghcr.io
120120
ORG ?= rancher

0 commit comments

Comments
 (0)