Documentation
¶
Overview ¶
Package generate produces CI platform configuration from cidx.toml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitHub ¶
GitHub generates a GitHub Actions workflow YAML from the CIDX config.
This entrypoint targets external projects: the bootstrap installs cidx via `go install` rather than building from source. Callers that need the cidx-repo bootstrap should use GitHubWithOptions with SelfBuild=true.
func GitHubWithOptions ¶ added in v1.7.0
func GitHubWithOptions(cfg *config.Config, opts GitHubOptions) (string, error)
GitHubWithOptions generates a GitHub Actions workflow YAML with explicit generation options. Use this when you need to control the bootstrap mode (self-build vs. go-install) directly.
func IsCidxRepo ¶ added in v1.7.0
IsCidxRepo reports whether dir is the cidx repository itself.
The check has two prongs to avoid false positives from any project that happens to have a cmd/cidx/ directory:
- cmd/cidx/main.go must exist
- go.mod's module declaration must equal the canonical cidx module path
Returns false on any I/O error or missing marker — external project semantics are the safe default.
Types ¶
type GitHubOptions ¶ added in v1.7.0
type GitHubOptions struct {
// SelfBuild emits the cidx-repo bootstrap (`go build -o bin/cidx ./cmd/cidx`).
// When false (the default for external projects), the bootstrap installs
// cidx via `go install <module>/cmd/cidx@latest`.
SelfBuild bool
}
GitHubOptions controls how the GitHub Actions workflow is generated.