Skip to content

Commit 3813f40

Browse files
sati.acwolfogre
authored andcommitted
use remoteAction.URL if not empty (#71)
Fixes go-gitea/gitea#25615 Reviewed-on: https://gitea.com/gitea/act/pulls/71 Co-authored-by: sati.ac <[email protected]> Co-committed-by: sati.ac <[email protected]>
1 parent eb19987 commit 3813f40

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/runner/step_action_remote.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,14 @@ type remoteAction struct {
215215
}
216216

217217
func (ra *remoteAction) CloneURL(u string) string {
218-
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
219-
u = "https://" + u
218+
if ra.URL == "" {
219+
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
220+
u = "https://" + u
221+
}
222+
} else {
223+
u = ra.URL
220224
}
225+
221226
return fmt.Sprintf("%s/%s/%s", u, ra.Org, ra.Repo)
222227
}
223228

0 commit comments

Comments
 (0)