You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
Remove plugin-only option from secrets (#2213)
This commit is contained in:
@@ -41,14 +41,13 @@ type Registry struct {
|
||||
}
|
||||
|
||||
type Secret struct {
|
||||
Name string
|
||||
Value string
|
||||
Match []string
|
||||
PluginOnly bool
|
||||
Name string
|
||||
Value string
|
||||
AllowedPlugins []string
|
||||
}
|
||||
|
||||
func (s *Secret) Available(container *yaml_types.Container) bool {
|
||||
return (len(s.Match) == 0 || utils.MatchImage(container.Image, s.Match...)) && (!s.PluginOnly || container.IsPlugin())
|
||||
return (len(s.AllowedPlugins) == 0 || utils.MatchImage(container.Image, s.AllowedPlugins...)) && (len(s.AllowedPlugins) == 0 || container.IsPlugin())
|
||||
}
|
||||
|
||||
type secretMap map[string]Secret
|
||||
|
||||
Reference in New Issue
Block a user