feat: add option to specify git remote name (#1104)

fixes https://github.com/nektos/act/issues/1099
fixes https://github.com/nektos/act/issues/983

Signed-off-by: Ryan <me@hackerc.at>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan
2022-04-04 19:53:08 +02:00
committed by GitHub
parent 9dc17f9144
commit d4272bd9fe
6 changed files with 15 additions and 7 deletions

View File

@@ -510,7 +510,7 @@ func (rc *RunContext) getGithubContext() *model.GithubContext {
}
repoPath := rc.Config.Workdir
repo, err := common.FindGithubRepo(repoPath, rc.Config.GitHubInstance)
repo, err := common.FindGithubRepo(repoPath, rc.Config.GitHubInstance, rc.Config.RemoteName)
if err != nil {
log.Warningf("unable to get git repo: %v", err)
} else {

View File

@@ -51,6 +51,7 @@ type Config struct {
ArtifactServerPort string // the port the artifact server binds to
CompositeRestrictions *model.CompositeRestrictions // describes which features are available in composite actions
NoSkipCheckout bool // do not skip actions/checkout
RemoteName string // remote name in local git repo config
}
// Resolves the equivalent host path inside the container