mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
Compare commits
7 Commits
v0.15.0-rc
...
v0.15.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cb097126c | ||
|
|
df96362c3c | ||
|
|
377d2dad5f | ||
|
|
87fc0e6567 | ||
|
|
06fdae4ab9 | ||
|
|
27129f24d5 | ||
|
|
de105f19c1 |
19
.github/workflows/goreleaser.yml
vendored
19
.github/workflows/goreleaser.yml
vendored
@@ -21,17 +21,20 @@ jobs:
|
|||||||
with: { go-version: '1.22' }
|
with: { go-version: '1.22' }
|
||||||
- uses: oven-sh/setup-bun@v1
|
- uses: oven-sh/setup-bun@v1
|
||||||
|
|
||||||
- run: make build-ui
|
- run: make install-ui build-ui
|
||||||
|
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
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
|
||||||
@@ -5,14 +5,84 @@ before:
|
|||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- id: darwin-amd64
|
||||||
- CGO_ENABLED=0
|
main: ./
|
||||||
|
binary: catalyst
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=o64-clang
|
||||||
|
- CXX=o64-clang++
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}}
|
||||||
|
- id: linux-arm64
|
||||||
|
main: ./
|
||||||
|
binary: catalyst
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
goarch:
|
||||||
|
- arm64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=aarch64-linux-gnu-gcc
|
||||||
|
- CXX=aarch64-linux-gnu-g++
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}}
|
||||||
|
- id: linux-amd64
|
||||||
|
main: ./
|
||||||
|
binary: catalyst
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=x86_64-linux-gnu-gcc
|
||||||
|
- CXX=x86_64-linux-gnu-g++
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}}
|
||||||
|
- id: windows-amd64
|
||||||
|
main: ./
|
||||||
|
binary: catalyst
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=x86_64-w64-mingw32-gcc
|
||||||
|
- CXX=x86_64-w64-mingw32-g++
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}}
|
||||||
|
- id: windows-arm64
|
||||||
|
main: ./
|
||||||
|
binary: catalyst
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=/llvm-mingw/bin/aarch64-w64-mingw32-gcc
|
||||||
|
- CXX=/llvm-mingw/bin/aarch64-w64-mingw32-g++
|
||||||
|
flags:
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}}
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- ids: [ catalyst ]
|
- ids: [ linux-amd64 ]
|
||||||
dockerfile: docker/Dockerfile
|
dockerfile: docker/Dockerfile
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/securitybrewery/catalyst:main"
|
- "ghcr.io/securitybrewery/catalyst:main"
|
||||||
@@ -22,7 +92,7 @@ dockers:
|
|||||||
- docker/entrypoint.sh
|
- docker/entrypoint.sh
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||||
name_template: >-
|
name_template: >-
|
||||||
{{ .ProjectName }}_
|
{{ .ProjectName }}_
|
||||||
@@ -34,7 +104,7 @@ archives:
|
|||||||
# use zip for windows archives
|
# use zip for windows archives
|
||||||
format_overrides:
|
format_overrides:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
format: zip
|
formats: zip
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
|
|||||||
11
main.go
11
main.go
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user