From 762d3708fc59e35b3f256390e71bbab20bc7ba0e Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Thu, 20 Feb 2020 20:47:21 -0500 Subject: [PATCH] fixes #90 - hard reset when using a version for an action Signed-off-by: Casey Lee --- act/common/git.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/act/common/git.go b/act/common/git.go index c20746d1..159141fa 100644 --- a/act/common/git.go +++ b/act/common/git.go @@ -258,6 +258,15 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor { return err } + err = w.Reset(&git.ResetOptions{ + Mode: git.HardReset, + Commit: *hash, + }) + if err != nil { + logger.Errorf("Unable to reset to %s: %v", hash.String(), err) + return err + } + logger.Debugf("Checked out %s", input.Ref) return nil }