mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-12-06 11:03:52 +00:00
ci(release): publish the standalone binaries and image with GoReleaser
GoReleaser now builds cmd/gateway for linux and darwin on amd64 and arm64. It publishes the archives and a signed multi-arch image, ghcr.io/lukaszraczylo/traefik-llmgateway, from Dockerfile.goreleaser. The plugin source archive does not change. The Release workflow sets docker-enabled, the same as the other projects on the shared workflow.
This commit is contained in:
@@ -9,6 +9,7 @@ on:
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
- ".goreleaser.yaml"
|
||||
- "Dockerfile.goreleaser"
|
||||
- ".gitattributes"
|
||||
- ".traefik.yml"
|
||||
- "version.go"
|
||||
@@ -25,4 +26,5 @@ jobs:
|
||||
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main
|
||||
with:
|
||||
go-version: "1.26.x"
|
||||
docker-enabled: true
|
||||
secrets: inherit
|
||||
|
||||
+58
-3
@@ -1,9 +1,36 @@
|
||||
version: 2
|
||||
|
||||
# Traefik plugins are source-only - no binary builds
|
||||
# Traefik loads plugins via Yaegi interpreter at runtime
|
||||
# Traefik loads the plugin from this repository's source under Yaegi, so the
|
||||
# plugin form needs no binary. The build below is the standalone gateway
|
||||
# (cmd/gateway), which runs behind a reverse proxy instead of inside Traefik.
|
||||
builds:
|
||||
- skip: true
|
||||
- id: llmgateway
|
||||
main: ./cmd/gateway
|
||||
binary: llmgateway
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
- GOFLAGS=-mod=vendor
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X main.version={{ .Version }}
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
archives:
|
||||
- id: llmgateway
|
||||
ids:
|
||||
- llmgateway
|
||||
formats: [tar.gz]
|
||||
name_template: "llmgateway_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
|
||||
# Source archive for GitHub releases, built with `git archive` under the
|
||||
# hood. `git archive` reads .gitattributes export-ignore at the archived
|
||||
@@ -60,3 +87,31 @@ signs:
|
||||
- "--yes"
|
||||
artifacts: checksum
|
||||
output: true
|
||||
|
||||
dockers_v2:
|
||||
- ids:
|
||||
- llmgateway
|
||||
images:
|
||||
- "ghcr.io/lukaszraczylo/traefik-llmgateway"
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- "latest"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
dockerfile: Dockerfile.goreleaser
|
||||
labels:
|
||||
"org.opencontainers.image.title": "llmgateway"
|
||||
"org.opencontainers.image.version": "{{ .Version }}"
|
||||
"org.opencontainers.image.source": "https://github.com/lukaszraczylo/traefik-llmgateway"
|
||||
"org.opencontainers.image.description": "Standalone multi-provider LLM gateway, the compiled form of the traefik-llmgateway plugin"
|
||||
"org.opencontainers.image.licenses": "MIT"
|
||||
|
||||
docker_signs:
|
||||
- cmd: cosign
|
||||
artifacts: manifests
|
||||
output: true
|
||||
args:
|
||||
- sign
|
||||
- "${artifact}@${digest}"
|
||||
- "--yes"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Image for the standalone gateway, built by GoReleaser (dockers_v2) from the
|
||||
# binaries it already compiled: dist/<os>/<arch>/llmgateway. `Dockerfile`
|
||||
# builds the same image from source for local use (make docker-build).
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
ARG TARGETPLATFORM
|
||||
COPY ${TARGETPLATFORM}/llmgateway /usr/local/bin/llmgateway
|
||||
USER nonroot:nonroot
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/usr/local/bin/llmgateway"]
|
||||
CMD ["-config", "/etc/llmgateway/config.yaml"]
|
||||
Reference in New Issue
Block a user