From cd5b93d1bc745bbc9630fdade03bf3306185579f Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Wed, 11 Mar 2026 10:24:20 +0100 Subject: [PATCH] Bump Go version (#4398) --- .github/workflows/go.yaml | 2 +- Dockerfile | 16 ++++++++-------- Makefile | 2 +- .../actions.summerwind.net/autoscaling.go | 2 +- github/actions/client.go | 2 +- go.mod | 2 +- test/e2e/e2e_test.go | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a4211c26..d1f5c59a 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -51,7 +51,7 @@ jobs: uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 with: only-new-issues: true - version: v2.5.0 + version: v2.11.2 generate: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 8f85044f..d24485cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.25.3 AS builder +FROM --platform=$BUILDPLATFORM golang:1.26.1 AS builder WORKDIR /workspace @@ -34,13 +34,13 @@ ENV GOCACHE="/build/${TARGETPLATFORM}/root/.cache/go-build" # Build RUN --mount=target=. \ - --mount=type=cache,mode=0777,target=${GOCACHE} \ - export GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT#v} && \ - go build -trimpath -ldflags="-s -w -X 'github.com/actions/actions-runner-controller/build.Version=${VERSION}' -X 'github.com/actions/actions-runner-controller/build.CommitSHA=${COMMIT_SHA}'" -o /out/manager main.go && \ - go build -trimpath -ldflags="-s -w -X 'github.com/actions/actions-runner-controller/build.Version=${VERSION}' -X 'github.com/actions/actions-runner-controller/build.CommitSHA=${COMMIT_SHA}'" -o /out/ghalistener ./cmd/ghalistener && \ - go build -trimpath -ldflags="-s -w" -o /out/github-webhook-server ./cmd/githubwebhookserver && \ - go build -trimpath -ldflags="-s -w" -o /out/actions-metrics-server ./cmd/actionsmetricsserver && \ - go build -trimpath -ldflags="-s -w" -o /out/sleep ./cmd/sleep + --mount=type=cache,mode=0777,target=${GOCACHE} \ + export GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT#v} && \ + go build -trimpath -ldflags="-s -w -X 'github.com/actions/actions-runner-controller/build.Version=${VERSION}' -X 'github.com/actions/actions-runner-controller/build.CommitSHA=${COMMIT_SHA}'" -o /out/manager main.go && \ + go build -trimpath -ldflags="-s -w -X 'github.com/actions/actions-runner-controller/build.Version=${VERSION}' -X 'github.com/actions/actions-runner-controller/build.CommitSHA=${COMMIT_SHA}'" -o /out/ghalistener ./cmd/ghalistener && \ + go build -trimpath -ldflags="-s -w" -o /out/github-webhook-server ./cmd/githubwebhookserver && \ + go build -trimpath -ldflags="-s -w" -o /out/actions-metrics-server ./cmd/actionsmetricsserver && \ + go build -trimpath -ldflags="-s -w" -o /out/sleep ./cmd/sleep # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index b45d4ba1..1404a2af 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ endif all: manager lint: - docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v2.5.0 golangci-lint run + docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v2.11.2 golangci-lint run GO_TEST_ARGS ?= -short diff --git a/controllers/actions.summerwind.net/autoscaling.go b/controllers/actions.summerwind.net/autoscaling.go index 1804bf28..06ba54fa 100644 --- a/controllers/actions.summerwind.net/autoscaling.go +++ b/controllers/actions.summerwind.net/autoscaling.go @@ -54,7 +54,7 @@ func (r *HorizontalRunnerAutoscalerReconciler) suggestDesiredReplicas(ghc *arcgi case v1alpha1.AutoscalingMetricTypePercentageRunnersBusy: suggested, err = r.suggestReplicasByPercentageRunnersBusy(ghc, st, hra, primaryMetric) default: - return nil, fmt.Errorf("validating autoscaling metrics: unsupported metric type %q", primaryMetric) + return nil, fmt.Errorf("validating autoscaling metrics: unsupported metric type %q", primaryMetric.Type) } if err != nil { diff --git a/github/actions/client.go b/github/actions/client.go index 77c21034..f2ebc251 100644 --- a/github/actions/client.go +++ b/github/actions/client.go @@ -256,7 +256,7 @@ func (c *Client) Identifier() string { identifier += fmt.Sprintf( "appID:%q,installationID:%q,key:%q", c.creds.AppCreds.AppID, - c.creds.AppCreds.AppInstallationID, + strconv.FormatInt(c.creds.AppCreds.AppInstallationID, 10), c.creds.AppCreds.AppPrivateKey, ) } diff --git a/go.mod b/go.mod index 78829741..22dd550c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/actions/actions-runner-controller -go 1.25.3 +go 1.26.1 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 22736a9b..c6c6d8c3 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -1106,7 +1106,7 @@ func installActionsWorkflow(t *testing.T, testName, runnerLabel, testResultCMNam testing.Step{ Uses: "actions/setup-go@v3", With: &testing.With{ - GoVersion: "1.25.1", + GoVersion: "1.26.1", }, }, )