Add Gitea Actions CI and release workflows and deployment assets
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2e7cb8171f
commit
d87c77dc13
12 files changed
+414
No files matched your search
@@ -13,6 +13,9 @@ import (
|
||||
"git.veillax.com/Veillax/reef/dotenv"
|
||||
)
|
||||
|
||||
// version is set at build time (deploy/build.sh).
|
||||
var version = "dev"
|
||||
|
||||
func env(k, def string) string {
|
||||
if v := os.Getenv(k); v != "" {
|
||||
return v
|
||||
@@ -31,11 +34,17 @@ func main() {
|
||||
data := flag.String("data", env("BAMBOO_DATA", "./bamboo-data"), "directory for this agent's WireGuard key")
|
||||
dockerOn := flag.Bool("docker", os.Getenv("BAMBOO_DOCKER") == "1", "report local Docker containers so they can be picked as targets in the UI")
|
||||
flag.String("env", ".env", "file to read secrets and settings from")
|
||||
showVersion := flag.Bool("version", false, "print the version and exit")
|
||||
flag.Parse()
|
||||
if *showVersion {
|
||||
os.Stdout.WriteString("bamboo " + version + "\n")
|
||||
return
|
||||
}
|
||||
if *hh == "" || *token == "" {
|
||||
flag.Usage()
|
||||
os.Exit(2)
|
||||
}
|
||||
log.Printf("bamboo %s starting", version)
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
b, err := bamboo.New(bamboo.Config{Hammerhead: strings.TrimRight(*hh, "/"), Token: *token, DataDir: *data, Docker: *dockerOn})
|
||||
|
||||
Reference in new issue
Block a user