Compare commits

...

3 Commits

Author SHA1 Message Date
Jonas Plum
87fc0e6567 fix: working directory (#1146) 2025-09-02 22:02:52 +00:00
Jonas Plum
06fdae4ab9 fix: adapt goreleaser for cross compilation (#1145) 2025-09-02 21:43:33 +00:00
Jonas Plum
27129f24d5 fix: recreate http flag (#1144) 2025-09-02 20:54:47 +00:00
3 changed files with 19 additions and 11 deletions

View File

@@ -28,10 +28,13 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: "securitybrewery" username: "securitybrewery"
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v6 - name: Run GoReleaser
with: run: |
distribution: goreleaser docker run --rm --privileged \
version: '~> v2' -v `pwd`:/go/src/github.com/SecurityBrewery/catalyst \
args: release --clean -v /var/run/docker.sock:/var/run/docker.sock \
env: -w /go/src/github.com/SecurityBrewery/catalyst \
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -e CGO_ENABLED=1 \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
ghcr.io/goreleaser/goreleaser-cross:latest \
release --clean

View File

@@ -6,7 +6,7 @@ before:
builds: builds:
- env: - env:
- CGO_ENABLED=0 - CGO_ENABLED=1
goos: goos:
- linux - linux
- darwin - darwin

11
main.go
View File

@@ -40,8 +40,11 @@ func main() {
}, },
}, },
{ {
Name: "serve", Name: "serve",
Usage: "Start the Catalyst server", Usage: "Start the Catalyst server",
Flags: []cli.Flag{
&cli.StringFlag{Name: "http", Usage: "HTTP listen address", Value: ":8090"},
},
Action: serve, Action: serve,
}, },
{ {
@@ -108,8 +111,10 @@ func serve(ctx context.Context, command *cli.Command) error {
defer cleanup() defer cleanup()
addr := command.String("http")
server := &http.Server{ server := &http.Server{
Addr: ":8090", Addr: addr,
Handler: catalyst, Handler: catalyst,
ReadTimeout: 10 * time.Minute, ReadTimeout: 10 * time.Minute,
} }