refactor: change configruation to yml

This commit is contained in:
2024-04-29 21:50:16 +02:00
parent 727b083e52
commit 5860f81aa2
13 changed files with 63 additions and 65 deletions

View File

@@ -8,7 +8,7 @@ import (
"syscall"
"gitea.urkob.com/urko/git-webhook-ci/internal/watcher"
"gitea.urkob.com/urko/git-webhook-ci/kit/cfg"
"gitea.urkob.com/urko/git-webhook-ci/kit/config"
"gitea.urkob.com/urko/git-webhook-ci/pkg"
)
@@ -24,7 +24,10 @@ func main() {
flag.Parse()
}
config := cfg.NewConfig(envFilePath)
config, err := config.LoadConfig(envFilePath)
if err != nil {
panic(err)
}
notifierIface = watcher.NewNotifier()
watcherIface = watcher.NewWatcher(notifierIface, pkg.Deploy)