From 16adc9e6ca3be3d1a6ad9b52ecb57ebb43ba2666 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Mon, 19 Jan 2026 15:40:54 +0100 Subject: [PATCH] fix: update Go version to 1.24 for Docker build The Dockerfile was using golang:1.22-alpine while go.mod requires Go 1.24.0 after recent dependency updates. This caused the Docker build to fail on main after merging Dependabot PRs. - Update Dockerfile to use golang:1.24-alpine - Use go-version-file in CI workflow to read version from go.mod --- .github/workflows/main.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e82b8257..1960cc00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 with: - go-version: '^1.22' + go-version-file: 'go.mod' - name: Run tests run: go test ./... @@ -93,7 +93,7 @@ jobs: - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 with: - go-version: '^1.22' + go-version-file: 'go.mod' - name: Build windows binary run: CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/OCAP2/web/server.BuildDate=`date -u +'%Y-%m-%dT%H:%M:%SZ'` -X github.com/OCAP2/web/server.BuildCommit=$GITHUB_SHA" -o ocap-webserver.exe ./cmd/ diff --git a/Dockerfile b/Dockerfile index 38328996..319f433d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine AS builder +FROM golang:1.24-alpine AS builder WORKDIR /go/pkg/ocap COPY . . ARG build_commit