Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit d14e211

Browse files
authored
Go 1.19, some deps upgrades (#147)
1 parent ebf8a78 commit d14e211

File tree

8 files changed

+81
-90
lines changed

8 files changed

+81
-90
lines changed

.github/actions/build/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Debian GNU/Linux 11 (1.17-bullseye)
2-
FROM golang:1.17-bullseye
1+
FROM golang:1.19-bullseye
32

43
# copy entrypoint file
54
COPY entrypoint.go /usr/bin/entrypoint.go

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ inputs:
3434
default: ''
3535
required: false
3636

37-
# action runner (golang:latest image)
37+
# action runner
3838
runs:
3939
using: 'docker'
4040
image: 'Dockerfile'

.github/actions/test/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17-bullseye
1+
FROM golang:1.19-bullseye
22

33
RUN apt-get update && apt-get install -y \
44
jq \
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
77
&& rm -rf /var/lib/apt/lists/*
88

99
# Install tools required for testing
10-
RUN go get -u golang.org/x/tools/cmd/goimports
10+
RUN go install golang.org/x/tools/cmd/goimports@latest
1111
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
1212

1313
# Install ngrok

.github/workflows/release.yml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ jobs:
1717
name: Generate cross-platform builds
1818
runs-on: ubuntu-latest
1919

20-
# services:
21-
# postgres:
22-
# image: postgres
23-
# env:
24-
# POSTGRES_PASSWORD: password
25-
# options: >-
26-
# --health-cmd pg_isready
27-
# --health-interval 10s
28-
# --health-timeout 5s
29-
# --health-retries 5
30-
3120
steps:
3221
- name: Checkout the repository
3322
uses: actions/checkout@v2
@@ -41,33 +30,14 @@ jobs:
4130
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
4231

4332
- name: Log in to Docker Hub
44-
uses: docker/login-action@v1
33+
uses: docker/login-action@v2
4534
with:
4635
username: ${{ secrets.DOCKER_USERNAME }}
4736
password: ${{ secrets.DOCKER_PASSWORD }}
4837
- name: Set up QEMU
49-
uses: docker/setup-qemu-action@v1
38+
uses: docker/setup-qemu-action@v2
5039
- name: Set up Docker Buildx
51-
uses: docker/setup-buildx-action@v1
52-
53-
# # Test AWS SNS
54-
# - name: Configure AWS credentials from test account
55-
# uses: aws-actions/configure-aws-credentials@v1
56-
# with:
57-
# aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
58-
# aws-secret-access-key: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
59-
# aws-region: ${{ secrets.AWS_REGION }}
60-
# - name: Run tests
61-
# uses: ./.github/actions/test
62-
# env:
63-
# QV_DEFAULTS_DATABASE_HOST: postgres
64-
# TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
65-
# TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
66-
# SLACK_HOOK: ${{ secrets.SLACK_HOOK }}
67-
# QV_LISTENERS__GCS_STORAGE_CONN: ${{ secrets.QV_LISTENERS__GCS_STORAGE_CONN }}
68-
# AWS_SNS_ARN: ${{ secrets.AWS_SNS_ARN }}
69-
# AWS_REGION: ${{ secrets.AWS_REGION }}
70-
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
40+
uses: docker/setup-buildx-action@v2
7141

7242
- name: Generate build files
7343
uses: ./.github/actions/build
@@ -80,7 +50,7 @@ jobs:
8050
name: 'qvalet'
8151

8252
- name: Build and push to Docker Hub
83-
uses: docker/build-push-action@v2
53+
uses: docker/build-push-action@v3
8454
with:
8555
push: true
8656
platforms: linux/amd64,linux/arm64,linux/arm

Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
ARG BUILDPLATFORM=amd64
22

3-
FROM --platform=$BUILDPLATFORM golang:alpine AS builder
4-
RUN apk --no-cache add ca-certificates
3+
FROM --platform=$BUILDPLATFORM golang:1.19-alpine3.16 AS builder
54

65
WORKDIR /app
76

87
COPY . .
98

109
RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o qvalet ./cmd
1110

12-
FROM --platform=$BUILDPLATFORM scratch
11+
FROM --platform=$BUILDPLATFORM alpine:3.16
12+
13+
RUN apk update && apk --no-cache add \
14+
ca-certificates \
15+
curl \
16+
wget \
17+
jq \
18+
bash \
19+
zsh \
20+
&& rm -vrf /var/cache/apk/*
1321

14-
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1522
COPY --from=builder /app/qvalet /usr/bin/qvalet
1623

1724
ENTRYPOINT ["qvalet"]

go.mod

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module qvalet
22

3-
go 1.17
3+
go 1.19
44

55
require (
66
github.com/Masterminds/goutils v1.1.1
@@ -19,21 +19,21 @@ require (
1919
github.com/gin-gonic/gin v1.8.1
2020
github.com/go-playground/validator/v10 v10.11.0
2121
github.com/goccy/go-yaml v1.9.5
22-
github.com/hashicorp/go-retryablehttp v0.7.0
23-
github.com/imdario/mergo v0.3.12
22+
github.com/hashicorp/go-retryablehttp v0.7.1
23+
github.com/imdario/mergo v0.3.13
2424
github.com/jessevdk/go-flags v1.5.0
2525
github.com/joho/godotenv v1.4.0
2626
github.com/mitchellh/mapstructure v1.5.0
2727
github.com/pkg/errors v0.9.1
2828
github.com/rs/cors v1.8.2
2929
github.com/sirupsen/logrus v1.8.1
30-
github.com/spf13/cast v1.4.1
30+
github.com/spf13/cast v1.5.0
3131
github.com/spf13/viper v1.9.0
3232
github.com/stretchr/testify v1.8.0
33-
github.com/uptrace/bun v1.1.5
34-
github.com/uptrace/bun/dialect/pgdialect v1.1.5
35-
github.com/uptrace/bun/driver/pgdriver v1.1.5
36-
github.com/uptrace/bun/extra/bundebug v1.1.5
33+
github.com/uptrace/bun v1.1.8
34+
github.com/uptrace/bun/dialect/pgdialect v1.1.8
35+
github.com/uptrace/bun/driver/pgdriver v1.1.8
36+
github.com/uptrace/bun/extra/bundebug v1.1.8
3737
)
3838

3939
require (
@@ -59,7 +59,7 @@ require (
5959
github.com/goccy/go-json v0.9.7 // indirect
6060
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
6161
github.com/golang/protobuf v1.5.2 // indirect
62-
github.com/google/go-cmp v0.5.6 // indirect
62+
github.com/google/go-cmp v0.5.7 // indirect
6363
github.com/google/go-querystring v1.0.0 // indirect
6464
github.com/google/uuid v1.3.0 // indirect
6565
github.com/googleapis/gax-go/v2 v2.1.0 // indirect
@@ -72,9 +72,9 @@ require (
7272
github.com/kevinburke/go-bindata v3.22.0+incompatible // indirect
7373
github.com/leodido/go-urn v1.2.1 // indirect
7474
github.com/magiconair/properties v1.8.5 // indirect
75-
github.com/mattn/go-colorable v0.1.12 // indirect
75+
github.com/mattn/go-colorable v0.1.13 // indirect
7676
github.com/mattn/go-ieproxy v0.0.1 // indirect
77-
github.com/mattn/go-isatty v0.0.14 // indirect
77+
github.com/mattn/go-isatty v0.0.16 // indirect
7878
github.com/mitchellh/copystructure v1.2.0 // indirect
7979
github.com/mitchellh/reflectwalk v1.0.2 // indirect
8080
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -104,15 +104,15 @@ require (
104104
go.uber.org/atomic v1.7.0 // indirect
105105
go.uber.org/multierr v1.6.0 // indirect
106106
go.uber.org/zap v1.19.0 // indirect
107-
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect
108-
golang.org/x/mod v0.4.2 // indirect
109-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
107+
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d // indirect
108+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
109+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
110110
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
111-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
112-
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
111+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
112+
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
113113
golang.org/x/text v0.3.7 // indirect
114114
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
115-
golang.org/x/tools v0.1.5 // indirect
115+
golang.org/x/tools v0.1.12 // indirect
116116
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
117117
google.golang.org/api v0.56.0 // indirect
118118
google.golang.org/appengine v1.6.7 // indirect
@@ -122,7 +122,7 @@ require (
122122
gopkg.in/ini.v1 v1.63.2 // indirect
123123
gopkg.in/yaml.v2 v2.4.0 // indirect
124124
gopkg.in/yaml.v3 v3.0.1 // indirect
125-
mellium.im/sasl v0.2.1 // indirect
125+
mellium.im/sasl v0.3.0 // indirect
126126
)
127127

128128
replace github.com/spf13/viper v1.9.0 => github.com/cmaster11/viper v1.6.3-0.20211025064843-b471e2653775

0 commit comments

Comments
 (0)