mirror of
https://github.com/drone/drone-kaniko.git
synced 2026-06-04 18:23:50 +08:00
config override
This commit is contained in:
@@ -201,9 +201,10 @@ func main() {
|
||||
func run(c *cli.Context) error {
|
||||
username := c.String("username")
|
||||
noPush := c.Bool("no-push")
|
||||
configOverride := c.Bool("dockerconfig-override")
|
||||
|
||||
// only setup auth when pushing or credentials are defined and docker config override is false
|
||||
if (!noPush || username != "") && !c.Bool("dockerconfig-override") {
|
||||
if (!noPush || username != "") && !configOverride {
|
||||
if err := createDockerCfgFile(username, c.String("password"), c.String("registry")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user