From 1807df54e28c7abfc35c259c83d55ab7085b425a Mon Sep 17 00:00:00 2001 From: Joe Kralicky Date: Thu, 3 Aug 2023 17:47:58 -0400 Subject: [PATCH] leave detached head mode after cloning into charts-repo --- dagger/helm/push.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dagger/helm/push.go b/dagger/helm/push.go index 54480d4ee6..b9cd177e6b 100644 --- a/dagger/helm/push.go +++ b/dagger/helm/push.go @@ -57,6 +57,7 @@ func PublishToChartsRepo(ctx context.Context, client *dagger.Client, opts Publis WithSecretVariable("GH_TOKEN", opts.Target.Auth.Secret). WithDirectory(workdir, client.Git(opts.Target.Repo, dagger.GitOpts{KeepGitDir: true}).Branch(opts.Target.Branch).Tree()). With(GithubCLI). + WithExec([]string{"git", "checkout", opts.Target.Branch}). // leave detached head WithExec([]string{"gh", "auth", "setup-git"}). // WithExec([]string{"gh", "repo", "clone", opts.Target.Repo, ".", "--", "--branch", opts.Target.Branch, "--depth", "1", "--no-tags"}). WithDirectory(chartsMountPath, opts.BuildContainer.Directory(chartsMountPath)). // Important: WithDirectory merges the contents