diff --git a/.github/actions/go/action.yaml b/.github/actions/go/action.yaml index 99a0cbe484bf..c16acbaefb07 100644 --- a/.github/actions/go/action.yaml +++ b/.github/actions/go/action.yaml @@ -14,9 +14,9 @@ runs: run: | sudo apt-get update sudo apt-get install -y wget unzip - wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip - sudo unzip protoc-21.12-linux-x86_64.zip -d /usr/local/ - sudo rm protoc-21.12-linux-x86_64.zip + wget https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip + sudo unzip protoc-28.2-linux-x86_64.zip -d /usr/local/ + sudo rm protoc-28.2-linux-x86_64.zip shell: bash - name: Add Go bin to PATH @@ -31,7 +31,7 @@ runs: - name: Install protoc-gen-go-grpc run: | - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 shell: bash - name: Add Go bin to PATH diff --git a/go/Dockerfile b/go/Dockerfile index 3bb161e310e9..e01d00a363fc 100644 --- a/go/Dockerfile +++ b/go/Dockerfile @@ -1,6 +1,12 @@ FROM golang:bookworm AS builder WORKDIR /build-dir -RUN apt-get update && apt-get install -y make git bash protobuf-compiler +RUN apt-get update && apt-get install -y make git bash protobuf-compiler unzip curl + +# Install a specific version of protoc +RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip && \ + unzip protoc-28.2-linux-x86_64.zip -d /usr/local/ && \ + rm protoc-28.2-linux-x86_64.zip && \ + chmod +x /usr/local/bin/protoc # Set the PATH to include Go binaries ENV PATH=$PATH:/root/go/bin @@ -15,7 +21,7 @@ RUN go mod download # Install protoc Go plugins RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 ENV GOCACHE=/root/.cache/go-build