Skip to content

Commit

Permalink
Update Go build and runtime to 1.19 (#2251)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbrm authored Dec 13, 2023
1 parent eda2bb0 commit cfcb81e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
matrix:
goversion:
- 1.18
- 1.19

steps:
- name: Checkout repository
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: golangci-lint-libs
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: golangci-lint-services
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: golangci-lint-tools
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: golangci-lint-cmd
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -79,7 +79,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'
- name: golangci-lint-main
uses: golangci/golangci-lint-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
go: "1.17" ## TODO update to 1.18 once all linters support it
go: "1.19"
timeout: 3m

linters-settings:
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

# Put certs in builder image.
RUN apk update
Expand All @@ -20,7 +20,8 @@ RUN cd main && go mod download && CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-w -s -X main.version=${VERSION} -X main.buildTime=${BUILD_TIME} -X main.commit=${COMMIT}" \
-o bat-go main.go

FROM alpine:3.15 as base
# golang:1.19-alpine is based on alpine:3.18.
FROM alpine:3.18 as base

# Put certs in artifact from builder.
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev-refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
# every time a file changes.
dev-refresh:
container_name: grant-dev-refresh
image: golang:1.18
image: golang:1.19
ports:
- "3335:3333"
- "6061:6061"
Expand Down
2 changes: 1 addition & 1 deletion services/rewards/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:

rewards-dev-refresh:
container_name: rewards-dev-refresh
image: golang:1.18
image: golang:1.19
ports:
- "3343:3343"
- "6061:6061"
Expand Down
2 changes: 1 addition & 1 deletion services/skus/docker-compose.payment-refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
# every time a file changes.
payment-refresh:
container_name: grant-payment-refresh
image: golang:1.18
image: golang:1.19
ports:
- "3335:3333"
- "6061:6061"
Expand Down
2 changes: 1 addition & 1 deletion services/skus/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
# every time a file changes.
skus-dev-refresh:
container_name: skus-dev-refresh
image: golang:1.18
image: golang:1.19
ports:
- "3353:3353"
- "6061:6061"
Expand Down
2 changes: 1 addition & 1 deletion services/wallet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
# every time a file changes.
wallet-dev-refresh:
container_name: wallet-dev-refresh
image: golang:1.18
image: golang:1.19
ports:
- "3353:3353"
- "6061:6061"
Expand Down
4 changes: 2 additions & 2 deletions tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

# put certs in builder image
RUN apk update
Expand All @@ -20,7 +20,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-w -s -X main.version=${VERSION} -X main.buildTime=${BUILD_TIME} -X main.commit=${COMMIT}" \
-o bat-go main.go

FROM alpine:3.15 as base
FROM alpine:3.18 as base
# put certs in artifact from builder
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /src/bat-go /bin/
Expand Down

0 comments on commit cfcb81e

Please sign in to comment.