1
0
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:
Anbraten
2023-10-24 20:38:47 +02:00
committed by GitHub
parent 703983419a
commit f44aa8a6fd
18 changed files with 112 additions and 104 deletions

View File

@@ -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