Skip to content

Commit

Permalink
Merge pull request #1616 from rancher/fix-helm-git-detached-head
Browse files Browse the repository at this point in the history
leave detached head mode after cloning into charts-repo
  • Loading branch information
dbason authored Aug 3, 2023
2 parents 1116823 + 1807df5 commit 13d8a9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dagger/helm/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13d8a9f

Please sign in to comment.