code.gitea.io/gitea@v1.19.3/modules/setting/actions.go (about)

     1  // Copyright 2022 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package setting
     5  
     6  import (
     7  	"code.gitea.io/gitea/modules/log"
     8  )
     9  
    10  // Actions settings
    11  var (
    12  	Actions = struct {
    13  		Storage           // how the created logs should be stored
    14  		Enabled           bool
    15  		DefaultActionsURL string `ini:"DEFAULT_ACTIONS_URL"`
    16  	}{
    17  		Enabled:           false,
    18  		DefaultActionsURL: "https://gitea.com",
    19  	}
    20  )
    21  
    22  func loadActionsFrom(rootCfg ConfigProvider) {
    23  	sec := rootCfg.Section("actions")
    24  	if err := sec.MapTo(&Actions); err != nil {
    25  		log.Fatal("Failed to map Actions settings: %v", err)
    26  	}
    27  
    28  	Actions.Storage = getStorage(rootCfg, "actions_log", "", nil)
    29  }