From 16f88a13365c84d7929b957cad8613ca7bc66387 Mon Sep 17 00:00:00 2001 From: Alexandru Gologan Date: Tue, 30 Dec 2025 19:01:12 +0200 Subject: [PATCH] build with go v1.25 (#814) --- .github/workflows/checks.yml | 6 +++--- .github/workflows/docker.yml | 2 +- .github/workflows/release.yml | 2 +- .golangci.yml | 7 +++++++ Dockerfile | 8 ++++---- go.mod | 4 ++-- 6 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 93cf846..e2002da 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,7 +15,7 @@ on: env: - GO_VERSION: "1.24" + GO_VERSION: "1.25" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -95,9 +95,9 @@ jobs: fetch-depth: 0 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v8 with: - version: v1.64.8 + version: v2.7.2 fmt: name: fmt diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 05a5231..3a69eb6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: - main env: - GO_VERSION: "1.24" + GO_VERSION: "1.25" CGO_ENABLED: 0 IMAGE_REPOSITORY: sosedoff/pgweb diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6f5a7..dc0df52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - "v*" env: - GO_VERSION: "1.24" + GO_VERSION: "1.25" CGO_ENABLED: 0 DOCKER_REPOSITORY: sosedoff/pgweb GHCR_REPOSITORY: sosedoff/pgweb diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..a599ac2 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,7 @@ +version: "2" +linters: + disable: + - errcheck + settings: + staticcheck: + checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1005", "-QF1004"] diff --git a/Dockerfile b/Dockerfile index 09069df..229ee56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ------------------------------------------------------------------------------ # Builder Stage # ------------------------------------------------------------------------------ -FROM golang:1.24-bullseye AS build +FROM golang:1.25-trixie AS build # Set default build argument for CGO_ENABLED ARG CGO_ENABLED=0 @@ -21,7 +21,7 @@ RUN make build # ------------------------------------------------------------------------------ # Fetch signing key # ------------------------------------------------------------------------------ -FROM debian:bullseye-slim AS keyring +FROM debian:trixie-slim AS keyring ADD https://www.postgresql.org/media/keys/ACCC4CF8.asc keyring.asc RUN apt-get update && \ apt-get install -qq --no-install-recommends gpg @@ -30,14 +30,14 @@ RUN gpg -o keyring.pgp --dearmor keyring.asc # ------------------------------------------------------------------------------ # Release Stage # ------------------------------------------------------------------------------ -FROM debian:bullseye-slim +FROM debian:trixie-slim ARG keyring=/usr/share/keyrings/postgresql-archive-keyring.pgp COPY --from=keyring /keyring.pgp $keyring RUN . /etc/os-release && \ echo "deb [signed-by=${keyring}] http://apt.postgresql.org/pub/repos/apt/ ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ apt-get update && \ - apt-get install -qq --no-install-recommends ca-certificates openssl netcat curl postgresql-client + apt-get install -qq --no-install-recommends ca-certificates openssl netcat-openbsd curl postgresql-client COPY --from=build /build/pgweb /usr/bin/pgweb diff --git a/go.mod b/go.mod index 4227494..3eca6f7 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/sosedoff/pgweb -go 1.24.0 +go 1.25 -toolchain go1.24.3 +toolchain go1.25.4 require ( github.com/BurntSushi/toml v1.1.0