# Tests the catalog and builds t5de-catalog for Linux (static) and its Docker image. name: CI on: push: branches: [main] tags: ["v*"] pull_request: workflow_dispatch: jobs: build: runs-on: ubuntu-latest env: # T5DE's modules (t5de-api) come straight from its Gitea, not through Go's public module proxy. GOPRIVATE: git.t5de.dev steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Test run: | unformatted=$(gofmt -l .) if [ -n "$unformatted" ]; then echo "Not gofmt-formatted: $unformatted"; exit 1; fi go vet ./... go test ./... # Static and reproducible: no cgo (the SQLite driver is pure Go), no paths, no build ID. - name: Build t5de-catalog run: | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildvcs=false \ -ldflags "-s -w -buildid= -X git.t5de.dev/t5de/t5de-catalog/internal/buildinfo.Version=${GITHUB_SHA::12}" \ -o dist/t5de-catalog ./cmd/t5de-catalog sha256sum dist/t5de-catalog