From 5163d401dc514483dbe07c8542f41add12a6ec0e Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Fri, 10 Oct 2025 23:39:04 -0700 Subject: [PATCH] Don't prepend server URL if its an empty string Instead of getting the URL "https://" which causes some actions to fail, they will now get the empty string if no instance is set (such as when running `exec`). Some github.com/actions actions such as cache fail with cryptic errors with an invalid URL --- act/runner/run_context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/act/runner/run_context.go b/act/runner/run_context.go index ff551322..8075d88b 100644 --- a/act/runner/run_context.go +++ b/act/runner/run_context.go @@ -1355,7 +1355,7 @@ func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubCon { // Adapt to Forgejo instance := rc.Config.GitHubInstance - if !strings.HasPrefix(instance, "http://") && + if instance != "" && !strings.HasPrefix(instance, "http://") && !strings.HasPrefix(instance, "https://") { instance = "https://" + instance }