feat: add option for docker image rebuild (#878)

Adds option to rebuild local action docker images

Fixed up README due to missing flags after
PR #714 and #716

Signed-off-by: hackercat <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan
2021-11-24 07:51:37 -08:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ff8b1df797
commit 8ad6c07083
5 changed files with 10 additions and 3 deletions
+1
View File
@@ -29,6 +29,7 @@ type Config struct {
DefaultBranch string // name of the main branch for this repository
ReuseContainers bool // reuse containers to maintain state
ForcePull bool // force pulling of the image, even if already present
ForceRebuild bool // force rebuilding local docker image action
LogOutput bool // log the output from docker run
Env map[string]string // env for containers
Secrets map[string]string // list of secrets
+1 -1
View File
@@ -552,7 +552,7 @@ func (sc *StepContext) execAsDocker(ctx context.Context, action *model.Action, a
}
}
if !correctArchExists {
if !correctArchExists || rc.Config.ForceRebuild {
log.Debugf("image '%s' for architecture '%s' will be built from context '%s", image, rc.Config.ContainerArchitecture, contextDir)
var actionContainer container.Container
if localAction {