feat: [CI-20527]: add push-only mode to skip build and push pre-existing images (#500)

* Add push-only support

* Include support for PLUGIN_NO_PUSH as well
This commit is contained in:
OP (oppenheimer)
2026-01-26 22:55:18 +05:30
committed by GitHub
parent 6799ac9418
commit aabeaaf7bb
3 changed files with 216 additions and 5 deletions
+13 -1
View File
@@ -33,7 +33,7 @@ func main() {
cli.BoolFlag{
Name: "dry-run",
Usage: "dry run disables docker push",
EnvVar: "PLUGIN_DRY_RUN",
EnvVar: "PLUGIN_DRY_RUN, PLUGIN_NO_PUSH",
},
cli.StringFlag{
Name: "remote.url",
@@ -339,6 +339,16 @@ func main() {
Usage: "additional cosign parameters (e.g., annotations, flags)",
EnvVar: "PLUGIN_COSIGN_PARAMS",
},
cli.BoolFlag{
Name: "push-only",
Usage: "skip build and only push images",
EnvVar: "PLUGIN_PUSH_ONLY",
},
cli.StringFlag{
Name: "source-image",
Usage: "source image to tag and push (format: repo:tag)",
EnvVar: "PLUGIN_SOURCE_IMAGE",
},
}
if err := app.Run(os.Args); err != nil {
@@ -419,6 +429,8 @@ func run(c *cli.Context) error {
Password: c.String("cosign.password"),
Params: c.String("cosign.params"),
},
PushOnly: c.Bool("push-only"),
SourceImage: c.String("source-image"),
}
if c.Bool("tags.auto") {