Skip to content

Commit

Permalink
action-runner check org_ids in config.json when bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
sfwn committed Jul 4, 2024
1 parent 4579989 commit e098da7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/action-runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e098da7

Please sign in to comment.