#Background:

1 messages ยท Page 1 of 1 (latest)

heavy oak
#

There are a couple ways you can go about it:

  • Clone repo B using dag.Git which will give you a Directory and call DockerBuild on
  • Pass a git reference to your function as a directory and do the same: https://docs.dagger.io/api/remote-modules/
  • Clone the repo manually...I think you can guess ๐Ÿ˜‰

Dagger supports the use of HTTP and SSH protocols for accessing remote repositories as Dagger modules, compatible with all major Git hosting platforms such as GitHub, GitLab, BitBucket, Azure DevOps, Codeberg, and Sourcehut. For SSH references ("refs"), Dagger employs a unified authentication approach.

mint yew
#

some maybe working psuedocode:

func (m *MyModule) Build(dir *dagger.Directory) *dagger.Container {
  return dir.DockerBuild()
}

or

func (m *MyModule) Build(repo string) *dagger.Container {
  return dag.Git(repo).Head().Tree().DockerBuild()
}
signal kelp
#

Oh interesting! I didn't realize ti woudl be so straightforward.

mint yew