From c024ab3079794aad486fccfb2b6270977001312c Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Sat, 28 Dec 2024 12:35:08 +0300 Subject: [PATCH] fix: Use correct clone URL with new-actions-cache new-actions-cache was not handling short action names relying on DEFAULT_ACTIONS_URL: it would try to fetch from the short name (actions/checkout) as if it was the full URL. This commit fixes that. Upstream nektos/act has deprecated legacy actions cache in favor of a new implementation which is more performant and does not suffer from data races: https://github.com/nektos/act/issues/2419#issuecomment-2282814122 This change is required to use new-actions-cache in Forgejo Runner. Signed-off-by: Vitaliy Potyarkin --- pkg/runner/step_action_remote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/runner/step_action_remote.go b/pkg/runner/step_action_remote.go index ed4d94e..8937e30 100644 --- a/pkg/runner/step_action_remote.go +++ b/pkg/runner/step_action_remote.go @@ -70,7 +70,7 @@ func (sar *stepActionRemote) prepareActionExecutor() common.Executor { var err error sar.cacheDir = fmt.Sprintf("%s/%s", sar.remoteAction.Org, sar.remoteAction.Repo) - repoURL := sar.remoteAction.URL + "/" + sar.cacheDir + repoURL := sar.remoteAction.CloneURL(sar.RunContext.Config.DefaultActionInstance) repoRef := sar.remoteAction.Ref sar.resolvedSha, err = cache.Fetch(ctx, sar.cacheDir, repoURL, repoRef, github.Token) if err != nil {