From e098da7c911a92708acfc1093348bc7534c2ee22 Mon Sep 17 00:00:00 2001 From: sfwn Date: Thu, 4 Jul 2024 17:36:55 +0800 Subject: [PATCH] action-runner check org_ids in config.json when bootstrap --- cmd/action-runner/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/action-runner/main.go b/cmd/action-runner/main.go index f68e77f00de..ece7bec4b08 100644 --- a/cmd/action-runner/main.go +++ b/cmd/action-runner/main.go @@ -53,6 +53,11 @@ func readConfig(path string) *actionrunner.Conf { os.Exit(-1) } } + // check org ids + if len(conf.OrgIDs) == 0 { + logrus.Error("org_ids could not be empty in config.json, format: [1, 2]") + os.Exit(-1) + } conf.BuildPath = getEnv("BUILD_ROOT_PATH", conf.BuildPath) if len(conf.BuildPath) <= 0 { conf.BuildPath = os.TempDir()