From c0087c3243516f7e24c01bd81a5f4f69cdc7ae46 Mon Sep 17 00:00:00 2001 From: Ingmar Stein Date: Fri, 24 May 2024 17:17:41 +0200 Subject: [PATCH] Push multi-platform images to GitHub Container Registry --- .github/workflows/release.yml | 2 ++ .goreleaser.yml | 19 +++++++++++++++---- pkg/multiplexer/multiplexer.go | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 314e7df..0dd0a71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ on: permissions: contents: write + packages: write + attestations: write jobs: goreleaser: diff --git a/.goreleaser.yml b/.goreleaser.yml index f2696f0..72c33e1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,8 +10,10 @@ builds: - -s -w -X github.com/ingmarstein/tcp-multiplexer/cmd.version={{.Version}} -X github.com/ingmarstein/tcp-multiplexer/cmd.commit={{.Commit}} -X github.com/ingmarstein/tcp-multiplexer/cmd.date={{.Date}} -X github.com/ingmarstein/tcp-multiplexer/cmd.builtBy=goreleaser goos: - linux - - windows - darwin + goarch: + - amd64 + - arch64 archives: - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' checksum: @@ -24,6 +26,15 @@ changelog: exclude: - '^docs:' - '^test:' -dockers: - - image_templates: - - ingmarstein/tcp-multiplexer \ No newline at end of file +kos: + - repository: ghcr.io/ingmarstein/tcp-multiplexer + tags: + - '{{.Version}}' + - latest + bare: true + preserve_import_paths: false + platforms: + - linux/amd64 + - linux/arm64 +docker_signs: + - artifacts: manifests diff --git a/pkg/multiplexer/multiplexer.go b/pkg/multiplexer/multiplexer.go index 88ab4ba..423fd71 100644 --- a/pkg/multiplexer/multiplexer.go +++ b/pkg/multiplexer/multiplexer.go @@ -94,7 +94,7 @@ L: func (mux *Multiplexer) handleConnection(conn net.Conn, sender chan<- *reqContainer) { defer func(c net.Conn) { if logrus.IsLevelEnabled(logrus.DebugLevel) { - logrus.Debugf("Closing client connecion: %v", c.RemoteAddr()) + logrus.Debugf("Closing client connection: %v", c.RemoteAddr()) } err := c.Close() sender <- &reqContainer{typ: Disconnection}