Fix func to determine default login (#29)
only add default login if auth profided or no login entry exist Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/29 Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
// Plugin implements drone.Plugin to provide the plugin implementation.
|
||||
type Plugin struct {
|
||||
settings Settings
|
||||
settings *Settings
|
||||
pipeline drone.Pipeline
|
||||
network drone.Network
|
||||
}
|
||||
@@ -14,8 +14,15 @@ type Plugin struct {
|
||||
// New initializes a plugin from the given Settings, Pipeline, and Network.
|
||||
func New(settings Settings, pipeline drone.Pipeline, network drone.Network) drone.Plugin {
|
||||
return &Plugin{
|
||||
settings: settings,
|
||||
settings: &settings,
|
||||
pipeline: pipeline,
|
||||
network: network,
|
||||
}
|
||||
}
|
||||
|
||||
// newSettingsOnly initializes a plugin from the given Settings only.
|
||||
func newSettingsOnly(settings *Settings) drone.Plugin {
|
||||
return &Plugin{
|
||||
settings: settings,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user