diff --git a/common/git.go b/common/git.go index 2c8efc2..76f0091 100644 --- a/common/git.go +++ b/common/git.go @@ -18,7 +18,7 @@ import ( log "github.com/sirupsen/logrus" git "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing" - "gopkg.in/yaml.v2" + yaml "gopkg.in/yaml.v2" ) var cloneLock sync.Mutex @@ -212,17 +212,16 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor { err = w.Pull(&git.PullOptions{ ReferenceName: refName, + Force: true, }) - if err != nil { + if err != nil && err.Error() != "already up-to-date" { input.Logger.Errorf("Unable to pull %s: %v", refName, err) } input.Logger.Debugf("Cloned %s to %s", input.URL.String(), input.Dir) err = w.Checkout(&git.CheckoutOptions{ - //Branch: plumbing.NewHash(ref), Branch: refName, - //Hash: plumbing.NewHash(input.Ref), - Force: true, + Force: true, }) if err != nil { input.Logger.Errorf("Unable to checkout %s: %v", refName, err) diff --git a/container/docker_run.go b/container/docker_run.go index 2a30e17..18cda31 100644 --- a/container/docker_run.go +++ b/container/docker_run.go @@ -10,7 +10,6 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/nektos/act/common" - log "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh/terminal" ) @@ -95,7 +94,7 @@ func createContainer(input NewDockerRunExecutorInput, cli *client.Client) (strin return "", err } input.Logger.Debugf("Created container name=%s id=%v from image %v", input.Name, resp.ID, input.Image) - log.Debugf("ENV ==> %v", input.Env) + input.Logger.Debugf("ENV ==> %v", input.Env) return resp.ID, nil }