From b0085b2ff1a7b6528deb3f802d5f7c46948ff579 Mon Sep 17 00:00:00 2001 From: Leon Tappe Date: Wed, 26 Jun 2024 11:44:29 +0200 Subject: [PATCH 1/3] bump deps --- .github/workflows/build.yaml | 10 +++++----- .github/workflows/release.yaml | 11 +++++------ Dockerfile | 2 +- go.mod | 6 ++++-- go.sum | 6 ++++-- pkg/probe/probe_amqp.go | 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0a6e5a8..e334900 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,15 +10,15 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.22" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 with: - version: v1.13.0 + version: v1.26.2 args: release --rm-dist --snapshot --skip-publish diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 05dcf93..5a5c5c8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,19 +10,18 @@ jobs: name: Build and release image runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: docker login -u "${{ secrets.QUAY_IO_USER }}" -p "${{ secrets.QUAY_IO_TOKEN }}" quay.io - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: "1.20" - + go-version: "1.22" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 with: - version: v1.13.0 + version: v1.26.2 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.RELEASE_USER_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 46becdf..3391bb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.12 +FROM alpine:3.20 COPY mittnite /usr/bin/mittnite COPY mittnitectl /usr/bin/mittnitectl EXPOSE 9102 diff --git a/go.mod b/go.mod index 01985c0..f607e82 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/mittwald/mittnite -go 1.20 +go 1.22 + +toolchain go1.22.3 require ( github.com/Masterminds/sprig/v3 v3.2.2 @@ -11,9 +13,9 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/hashicorp/hcl v1.0.0 github.com/pkg/errors v0.9.1 + github.com/rabbitmq/amqp091-go v1.10.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 - github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71 github.com/stretchr/testify v1.8.0 github.com/tidwall/pretty v1.0.0 go.mongodb.org/mongo-driver v1.5.1 diff --git a/go.sum b/go.sum index 26d80ad..84e2d97 100644 --- a/go.sum +++ b/go.sum @@ -252,6 +252,8 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw= +github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -289,8 +291,6 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71 h1:2MR0pKUzlP3SGgj5NYJe/zRYDwOu9ku6YHy+Iw7l5DM= -github.com/streadway/amqp v0.0.0-20200108173154-1c71cc93ed71/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -321,6 +321,8 @@ go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/pkg/probe/probe_amqp.go b/pkg/probe/probe_amqp.go index 75409c9..d059203 100644 --- a/pkg/probe/probe_amqp.go +++ b/pkg/probe/probe_amqp.go @@ -6,8 +6,8 @@ import ( "github.com/mittwald/mittnite/internal/config" "github.com/mittwald/mittnite/internal/helper" + amqp "github.com/rabbitmq/amqp091-go" log "github.com/sirupsen/logrus" - "github.com/streadway/amqp" ) const ( From cf40112cd240b20fc5dd8f45d4f00a512f57109e Mon Sep 17 00:00:00 2001 From: Leon Tappe Date: Wed, 26 Jun 2024 11:49:09 +0200 Subject: [PATCH 2/3] replace deprecated archives.replacements with name_template abuse --- .goreleaser.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 6fd8d17..be857b3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -23,12 +23,13 @@ builds: binary: mittnitectl main: ./cmd/mittnitectl archives: - - replacements: - darwin: macos - linux: linux - windows: windows - 386: i386 - amd64: x86_64 + - name_template: >- + {{- .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end -}} files: - LICENSE nfpms: From de678940b88b0d2db845419b48c90ad17c9a254c Mon Sep 17 00:00:00 2001 From: Leon Tappe Date: Wed, 26 Jun 2024 11:50:29 +0200 Subject: [PATCH 3/3] update deprecated releaser options --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e334900..e1bb5bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,4 +21,4 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: version: v1.26.2 - args: release --rm-dist --snapshot --skip-publish + args: release --clean --snapshot --skip=publish diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5a5c5c8..203b0d3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,6 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: version: v1.26.2 - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.RELEASE_USER_TOKEN }}