diff options
author | Ryan <me@hackerc.at> | 2021-11-24 16:51:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 16:51:37 +0100 |
commit | 8ad6c07083c7cd7f45ea9e0808e3297bf2370ab5 (patch) | |
tree | 5b3a27e49c1b14d15fcdf3dae3df1091813a9fb4 /cmd | |
parent | Don't interpolate joboutputs, before job is done (#894) (diff) | |
download | forgejo-act-8ad6c07083c7cd7f45ea9e0808e3297bf2370ab5.tar.xz forgejo-act-8ad6c07083c7cd7f45ea9e0808e3297bf2370ab5.zip |
feat: add option for docker image rebuild (#878)v0.2.25
Adds option to rebuild local action docker images
Fixed up README due to missing flags after
PR #714 and #716
Signed-off-by: hackercat <me@hackerc.at>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/input.go | 1 | ||||
-rw-r--r-- | cmd/root.go | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cmd/input.go b/cmd/input.go index 7e52884..4dea829 100644 --- a/cmd/input.go +++ b/cmd/input.go @@ -20,6 +20,7 @@ type Input struct { platforms []string dryrun bool forcePull bool + forceRebuild bool noOutput bool envfile string secretfile string diff --git a/cmd/root.go b/cmd/root.go index 31686ef..adfe69b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -45,6 +45,7 @@ func Execute(ctx context.Context, version string) { rootCmd.Flags().BoolVarP(&input.reuseContainers, "reuse", "r", false, "reuse action containers to maintain state") rootCmd.Flags().BoolVarP(&input.bindWorkdir, "bind", "b", false, "bind working directory to container, rather than copy") rootCmd.Flags().BoolVarP(&input.forcePull, "pull", "p", false, "pull docker image(s) even if already present") + rootCmd.Flags().BoolVarP(&input.forceRebuild, "rebuild", "", false, "rebuild local action docker image(s) even if already present") rootCmd.Flags().BoolVarP(&input.autodetectEvent, "detect-event", "", false, "Use first event type from workflow as event that triggered the workflow") rootCmd.Flags().StringVarP(&input.eventPath, "eventpath", "e", "", "path to event JSON file") rootCmd.Flags().StringVar(&input.defaultBranch, "defaultbranch", "", "the name of the main branch") @@ -260,6 +261,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str EventPath: input.EventPath(), DefaultBranch: defaultbranch, ForcePull: input.forcePull, + ForceRebuild: input.forceRebuild, ReuseContainers: input.reuseContainers, Workdir: input.Workdir(), BindWorkdir: input.bindWorkdir, |