Skip to content

Commit

Permalink
update go and net and grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
bojand committed May 5, 2024
1 parent 6bc85c8 commit 0afd652
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 80 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22.2
id: go
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-go-mod
with:
path: ~/go/pkg/mod
Expand All @@ -55,7 +55,7 @@ jobs:
${{ runner.os }}-go-
- name: Cache bin directory
id: cache-go-bin
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/bin
key: ${{ runner.os }}-go-bin-${{ env.GOLANGCI_LINT_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/certs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Refresh certificates
run: openssl req -x509 -out testdata/localhost.crt -keyout testdata/localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <( printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
- name: Commit to repository
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22.2

- name: Get current time
uses: josStorer/[email protected]
Expand Down
17 changes: 8 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# syntax=docker.io/docker/dockerfile:1.3-labs@sha256:250ce669e1aeeb5ffb892b18039c3f0801466536cb4210c8eb2638e628859bfd

FROM --platform=$BUILDPLATFORM docker.io/library/alpine:3.17 AS alpine
FROM --platform=$BUILDPLATFORM docker.io/library/golang@sha256:403f48633fb5ebd49f9a2b6ad6719f912df23dae44974a0c9445be331e72ff5e AS golang
FROM --platform=$BUILDPLATFORM gcr.io/distroless/base:nonroot@sha256:e406b1da09bc455495417a809efe48a03c48011a89f6eb57b0ab882508021c0d AS distroless
# FROM --platform=$BUILDPLATFORM docker.io/library/alpine:3.19 AS alpine
# FROM --platform=$BUILDPLATFORM docker.io/library/golang@sha256:403f48633fb5ebd49f9a2b6ad6719f912df23dae44974a0c9445be331e72ff5e AS golang
# FROM --platform=$BUILDPLATFORM gcr.io/distroless/base:nonroot@sha256:e406b1da09bc455495417a809efe48a03c48011a89f6eb57b0ab882508021c0d AS distroless


FROM golang AS builder
FROM golang:1.22.2 AS builder
WORKDIR /app
ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
Expand All @@ -28,11 +27,11 @@ FROM scratch AS ghz-binary-built
COPY --from=builder /app/dist/ghz /


FROM alpine AS osmap-linux
FROM alpine:3.19 AS osmap-linux
RUN echo linux >/os
FROM alpine AS osmap-macos
FROM alpine:3.19 AS osmap-macos
RUN echo darwin >/os
FROM alpine AS osmap-windows
FROM alpine:3.19 AS osmap-windows
RUN echo windows >/os
FROM osmap-$TARGETOS AS osmap

Expand All @@ -58,7 +57,7 @@ EOF
FROM scratch AS ghz-binary
COPY --from=fetcher /app/exe/* /

FROM distroless AS ghz
FROM gcr.io/distroless/base:nonroot AS ghz
COPY --from=ghz-binary --chown=nonroot /ghz /
RUN ["/ghz", "--version"]
ENTRYPOINT ["/ghz"]
41 changes: 21 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/go-playground/validator v9.31.0+incompatible
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.3
github.com/golangci/golangci-lint v1.43.0
github.com/google/uuid v1.3.0
github.com/jhump/protoreflect v1.15.1
Expand All @@ -20,22 +20,23 @@ require (
github.com/labstack/gommon v0.4.0
github.com/mfridman/tparse v0.11.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.32.1
github.com/rakyll/statik v0.1.7
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.3
go.uber.org/multierr v1.9.0
go.uber.org/zap v1.24.0
golang.org/x/net v0.7.0
golang.org/x/net v0.24.0
golang.org/x/sync v0.1.0
golang.org/x/tools v0.5.0
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.2-0.20230222093303-bc1253ad3743
golang.org/x/tools v0.7.0
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.30.0
)

require (
4d63.com/gochecknoglobals v0.1.0 // indirect
cloud.google.com/go/compute v1.5.0 // indirect
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Antonboom/errname v0.1.6 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/BurntSushi/toml v1.1.0 // indirect
Expand All @@ -55,19 +56,19 @@ require (
github.com/breml/bidichk v0.2.3 // indirect
github.com/bufbuild/protocompile v0.4.0 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/charithe/durationcheck v0.0.9 // indirect
github.com/charmbracelet/lipgloss v0.4.0 // indirect
github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4 // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/daixiang0/gci v0.2.9 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingajkin/go-header v0.4.2 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021 // indirect
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f // indirect
github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
Expand Down Expand Up @@ -192,14 +193,14 @@ require (
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 0afd652

Please sign in to comment.