diff --git a/gitea-ci/main.go b/gitea-ci/main.go index 1635670..7868ddf 100644 --- a/gitea-ci/main.go +++ b/gitea-ci/main.go @@ -24,10 +24,15 @@ func main() { } log.Printf("Logged in as @%s", u.Login) + port := ":8080" + if len(os.Args) > 1 { + port = os.Args[1] + } + http.Handle("/webhook", webhook{config: config, gitea: g}) http.Handle("/logs/socket/", logWebsocket{}) http.Handle("/", http.FileServer(http.Dir("."))) - log.Fatal(http.ListenAndServe(":8080", nil)) + log.Fatal(http.ListenAndServe(port, nil)) } type config struct {