act/pkg/common
Michael Heap dfd1fee7fe
Pull latest changes from ref using cached repo (#267)
* Pull latest changes from ref using cached repo

Act switched from checking out a branch to checking out
a hash in order to resolve #24 - see
bc5c23e8e4

This had a side effect of preventing `w.Pull()` from updating
to the latest commit if a ref was a branch/tag and the repo
already exists on disk.

This commit checks if input.Ref is equivalent to the resolved
hash, and runs `r.Fetch()` and checks out the branch for input.Ref
if it is different. `w.Pull()` can then pull the latest changes
before we checkout `*hash` again like normal

* Extract CloneIfRequired to reduce cyclomatic complexity

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-06-09 07:43:26 -07:00
..
cartesian.go matrix is done 2020-02-20 21:06:03 -05:00
cartesian_test.go Spelling (#240) 2020-05-18 09:53:42 -07:00
draw.go initial load of yaml working 2020-02-04 16:38:41 -08:00
dryrun.go successfully able to run simple workflows 2020-02-20 21:05:25 -05:00
executor.go shared container for job 2020-02-23 15:01:25 -08:00
executor_test.go successfully able to run simple workflows 2020-02-20 21:05:25 -05:00
file.go initial load of yaml working 2020-02-04 16:38:41 -08:00
git.go Pull latest changes from ref using cached repo (#267) 2020-06-09 07:43:26 -07:00
git_test.go stop overwritting gitconfig 2020-02-20 21:06:30 -05:00
line_writer.go integration test 2020-02-24 12:48:12 -08:00
line_writer_test.go integration test 2020-02-24 12:48:12 -08:00
logger.go successfully able to run simple workflows 2020-02-20 21:05:25 -05:00