From 6698f5978ac288fd9351dfe6f6c24772c331865e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Van=C3=AD=C4=8Dek?= Date: Tue, 22 Aug 2023 17:25:33 +0200 Subject: [PATCH] Optionally no pulling using NoForcePull --- plugin.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin.go b/plugin.go index 769e53b..2e2bef3 100644 --- a/plugin.go +++ b/plugin.go @@ -38,6 +38,7 @@ type ( EventPayload string // Webhook event payload Actor string Verbose bool + NoForcePull bool } Plugin struct { @@ -92,6 +93,10 @@ func (p Plugin) Exec() error { cmdArgs = append(cmdArgs, "-v") } + if p.Action.NoForcePull { + cmdArgs = append(cmdArgs, "--pull", "false") + } + if p.Daemon.Disabled { hostWorkDirPath, guestWorkDirPath, err := getWorkDirPath(p, context.Background()) if err != nil {