fixes #90 - hard reset when using a version for an action
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
80147e8b5b
commit
58731e8d9b
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue